[pmwiki-users] php advice needed

Hans design5 at softflow.co.uk
Wed Nov 12 12:11:57 CST 2008


Wednesday, November 12, 2008, 5:05:12 PM, noskule wrote:

> this works just fine. But I'm looking for a way to avoid the EOF  part in
> style.css. Does anyone have a clue how to do that?

see http://us2.php.net/types.string
under "heredoc".

<<<XYZ
string here...
XYZ;

is called 'heredoc syntax'.
It is convenient since you don't need to escape any quotes.
Otherwise you could just put your string (css code)
in double quotes, but make sure any quotes are escaped.
For instance:

<?php
return "
a { color:$links_color; }
...more css....
";

  ~Hans




More information about the pmwiki-users mailing list