XHTML document in a .PHP file - How?

admin

Administrator
Staff member
XHTML documents *must* begin with the processing instruction <?xmlversion="1.0"?>. Unfortunately, when the PHP parser sees <? it tries toparse it as PHP. How can I solve this? Should I put an include(); statementatthe begining of the file to insert another file containing the XML processinginstruction?If that doesn't do the trick what will?PHP has XML parsing functions but that's not what I need. The XHTML(essentially HTML) document can already be converted to XML whenvalidated against the W3C's XHTML DTD at the location specified in theDOCTYPE declaration.Any suggestions of a better forum to post this question would be greatlyappreciated.AFAIK, there is no PHP newsgroup.
 
Back
Top