PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
i am trying to create an xhtml strict page. At the top i have a small piece of php code that will check the user has the required cookie (ie they've logged in) as soon as i include this code the page is a php page and therefore not valid xhtml. The php code is:
you don't have to, because only the output has to be validated. and the <?php ... ?> block is not a part of the output.
well, do you have <?php and ?> around your code-block at all?
I'm not really sure what's your problem but I guess that you're trying to validate the php source code. Put into the validator instead the page which has been already generated by the server - so without the php code. PHP is not a part of xHTML.