hansu
Programmer
- Mar 12, 2002
- 89
To build a page dynamically I use a string like the following:
This produces the error: unexpected T_ENCAPSED_AND_WHITESPACE
So far I didn't find a way to set quotes properly to avoid this error. I can use setLanguage($PHP_SELF), which works but I'm not sure whether that is a good idea. (I'm using PHP 5)
Thanks for any assistance.
Code:
<?php
$header_0_en = <<<EOD
<div id="langcontainer">
<?php echo setLanguage($_SERVER['PHP_SELF']); ?>
</div>
EOD;
?>
So far I didn't find a way to set quotes properly to avoid this error. I can use setLanguage($PHP_SELF), which works but I'm not sure whether that is a good idea. (I'm using PHP 5)
Thanks for any assistance.