[thelist] [PHP] Heredoc and Constants

Keith Dahlby dahlbyk at softhome.net
Thu Aug 14 11:21:15 CDT 2003


I'm working on a theme for PHP-Nuke and would like to use Heredoc syntax 
[1] for big blocks of HTML (I'm sick of reading code with endless \" and 
\n). The only problem is that Nuke stores language information as 
constants. All the themes I've seen simply break out of the string to 
include this information: "<p>"._CONSTANT."</p>", but this is extremely 
inconvenient with Heredoc. I know constants can be referenced with the 
constant('_CONSTANT') function, but there doesn't seem to be a way to embed 
a function call, either.

Ideas? TIA!

Cheers ~ K

[1] http://www.php.net/types.string#language.types.string.syntax.heredoc

More information about the thelist mailing list