It's a good idea to start using some PHP Template Engine from the very beginning of your learning. It allows you to keep HTML and PHP code in separate files. HTML can look something like that:
Type: Posts; User: badhim
Search: Search took 0.02 seconds.
Results 1 to 1 of 1