I have some pages that I currently include using Frontpage extensions. Those pages require the <html><head> and <body> tags. What I want to do is use the same files included using php but stripping out the code that goes from <html> to the end of the <body> code and also strips out the </body></html> code at the end. I am sure this is easy to do, but I am a newbie and it would be a great help if someone could suggest the best way to include files...
reason I ask this is when I include a file like example.html using php includes, is because it gives something like this...
Example.html (I am including)
<html>
<head>
<title>title of page</title>
</head>
<body bgcolor="white">
This is content I want to include <img src="pic"> <p>
So on and so on...
</body>
</html>
at moment when I do this code.. .
text text text <p>
<? include ('Example.html'); ?> <p>
text2 text2 etc. etc...
it returns this... (notice teh full html code is included from the include page.)
text text text <p>
<html>
<head>
<title>title of page</title>
</head>
<body bgcolor="white">
This is content I want to include <img src="pic"> <p>
So on and so on...
</body>
</html><p>
text2 text2 etc. etc...
when I want it to look like...(notice the code stripped out from the body tag up and the closing body tag down...)
text text text <p>
This is content I want to include <img src="pic"> <p>
So on and so on...
<p>
text2 text2 etc. etc...
Thanks and I know this is most likely very easy stuff. Thanks for the help.