Include a repetitive chunk of HTML

Posted by user146780 on Stack Overflow See other posts from Stack Overflow or by user146780
Published on 2010-05-19T16:19:20Z Indexed on 2010/05/19 16:50 UTC
Read the original article Hit count: 166

I basically have a div on my site that always has the same stuff. However, this div is not present on all pages which is why I won't use the dynamic web template. I was wondering if it was possible for PHP to get the code from a document on the server and put in into the div?

Ex:

<div id="section...

then my text file contains

<p>hello</p>

Basically I want PHP to put it into the div when the user sees it.

If theres a smarter way of acheiving this I'd be open to it as well.

Thanks

© Stack Overflow or respective owner

Related posts about php

Related posts about web-development