jlizarraga
06-26-2009, 06:51 PM
EDIT: Yep, only works with double quotes. I didn't realize there were so many differences in single and double quotes in PHP - that is definitely going to come in handy in the future!
If you want to keep using single quotes, just do it with concatenation: $var = '$someLiteralString'."\n";
Hi all,
This is working for me:
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"http://yui.yahooapis.com/2.7.0/build/container/assets/skins/sam/container.css\" />\n";
But this one prints the "\n" as text:
echo '<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.7.0/build/container/assets/skins/sam/container.css" />\n';
Do you HAVE to use double quotes with newlines? Could this be something specific to the PHP setup? I'm still new to PHP.
Thanks a bunch for any help.
If you want to keep using single quotes, just do it with concatenation: $var = '$someLiteralString'."\n";
Hi all,
This is working for me:
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"http://yui.yahooapis.com/2.7.0/build/container/assets/skins/sam/container.css\" />\n";
But this one prints the "\n" as text:
echo '<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.7.0/build/container/assets/skins/sam/container.css" />\n';
Do you HAVE to use double quotes with newlines? Could this be something specific to the PHP setup? I'm still new to PHP.
Thanks a bunch for any help.