When I use a conditional statement targeting IE6 and below with some PHP code Google Chrome disregards the statement and inserts the code.
Example:
<!--[if lte IE 6]>
<?php require_once("ie6.php"); ?>
<![endif]-->
It will insert the content of ie6.php in the body anyway.
The code in ie6.php is something like this:
<?php print '<p>This is IE6</p>'; ?>
Anybody got this problem before?
The problem was that inside the html code in the ie6.php was another comment and Chrome didn’t like it.
Something like this:
It seems Chrome was interpreting the comment closing tag as the end tag and subsequently “misreading” the conditional statement.