Justtechjobs.com Find a programming school near you






Online Campus Both


php-general | 2000071

Re: [PHP] "here" document From: Carroll Barrett (cbarrett <email protected>)
Date: 07/14/00

I prefer this "here doc" ...

<?php
$name="John Doe";
$product="Deluxe Widget";
$amount="100.00";
echo <<< ENDOFECHO;
<HTML>
<BODY>
<H3>$header3</H3>
Hello, $name. I am glad you chose to buy our $product for
$amount.
</BODY>
</HTML>
ENDOFECHO;
?>

to this ...

<?php
$name="John Doe";
$product="Deluxe Widget";
$amount="100.00"
?>
<HTML>
<BODY>
Hello, <?php echo $name ?>. I am glad you chose to buy our <?php
echo $product ?> for <?php echo $amount ?>.
</BODY>
</HTML>

I think this is easier to read. Just MHO.

Regards,
Carroll Barrett

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe <email protected>
For additional commands, e-mail: php-general-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>