Hello,
Does anyone know if there is a print function in PHP3 that allows someone to print a whole block of code..similar to perl.
Like This:
print <<END_OF_PAGE;
<HEAD><TITLE></TITLE> <BODY> OTHER TAGS </body>
END_OF_PAGE
Mike
Hi
You can use this
<?php
$var=<<<BLOCK
tags tag tags ...
BLOCK;
echo $var;
?>
See: http://www.php.net/manual/en/html/language.types.string.html where it states that here-doc support was added in PHP 4. This means that the only way you can do this in PHP3 is to use a multi-line string.