Forum Moderators: coopster
Some research and I rediscovered / remembered that if IE6 sees anything before the DOCTYPE, it goes to quirks mode.
I'm a newbie in PHP - but I'm under the impression that PHP code is REQUIRED to be put at the top of the document, before the DOCTYPE. Is that a fact? Or can I simply put the PHP anywhere in between the 'head' tags and still be safe?
For all intents and purposes, that approach -- putting the PHP after the DOCTYPE, in the header - appears to work. My page renders in standards mode in IE, the page validates... seems fine. But am I missing some other risk, security issues with PHP being in the header for example?
Just wondering... any input is appreciated!
oh yeah... I even went so far to use PHP to write out the DOCTYPE. Again, I'm a newbie to PHP, so is this even making any difference at all? Example:
<?php
print '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
?> Followed by the rest of the PHP, and then the '<html xmlns="http://www.w3.org/1999/xhtml">
<head>' and the rest of the document as usual.
Thoughts?
I'm under the impression that PHP code is REQUIRED to be put at the top of the document, before the DOCTYPE