PHP Escaping from HTML, faster, cleanner?!
- by rno
I've read about it from the php website (http://us3.php.net/manual/en/language.basic-syntax.phpmode.php)
Using:
echo "<html tag>"
is slower and also annoying because you got to escape char like " with \"
But what's about using
$output = <<< EOF
<html code>
EOF;
Then later on in the code I can use
$output .= <<< EOF
<some more html code>
EOF;
then when I want to print it:
echo "$output";
I think it's a great idea, but really wonder what you PHP guru think about it.
Cheers,
rno