I recently ran into this little bit of info when working on some code to replace line breaks in a string with some HTML code....
When quoting attributes PHP (Perl as well) treats values wrapped by single quotes as there face value, it will not replaced variables or treat special characters how you would expect. When using double quotes variables are replaced and special character sets are treated normaly.
Here is an example:
PHP Code:
<?
$FeaturesFixed = "this
is
the
features
code";
$FeaturesFixed = ereg_replace ("\n", "<li>", $Features);
echo(" <li>$FeaturesFixed");
?>
Code:
<li>this
<li>is
<li>the
<li>features
<li>code
now with single quotes
PHP Code:
<?
$FeaturesFixed = ereg_replace ('\n', '<li>', $Features);
echo(" <li>$FeaturesFixed");
?>
Code:
<li>this
is
the
features
code