Re: Newlines don't work.



echo("line1\n");
echo("line2");

or

<?php
$str = <<<EOD
Example of string
spanning multiple lines
using heredoc syntax.
EOD;
echo($str);
?>

lister schreef:
Hi,

I am trying to output a newline, but this doesn't work:

echo "Line1\nLine2";

Before anyone says, I know HTML doesn't recognise newlines. I don't
need newlines in the rendered HTML, I need newlines in the SOURCE to
make it understandable.

Cheers,
Lister

.