How do I add content using .php coding?

I have ran a website before, but took a while off and completely forgot what to do!

I got my web layout coded, and have the index page up, but I completely forgot about header pages, and how to add content without having to enter in all the info for the layout.

Any links to websites would be helpful!

The keyterm "echo" will print out html code.