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 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:15 UTC