W3C home > Mailing lists > Public > www-style@w3.org > May 2012

Re: [css-variables] Using $foo as the syntax for variables

From: Keryx Web <webmaster@keryx.se>
Date: Mon, 28 May 2012 21:30:09 +0200
Message-ID: <4FC3D241.5000703@keryx.se>
To: www-style@w3.org
2012-05-27 10:55, Anton Prowse skrev:
> That doesn't seem like a very typical use of heredocs.  Much more
> common, I would have thought, would be assigning the value to a variable:
>
> $foo = <<<EOD
>
> EOD;

Solvable.

If you want your dollar signs to be non-PHP-sigils, then use nowdoc. It 
makes heredoc work like single quoted strings.

Or escape the dollar sign:

$foo = <<<EOD
     prop: \$bar;
EOD;


-- 
Keryx Web (Lars Gunther)
http://keryx.se/
http://twitter.com/itpastorn/
http://itpastorn.blogspot.com/
Received on Monday, 28 May 2012 19:30:41 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:54 GMT