|
Posted by Vincent on 01/31/07 15:23
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
>
Navigation:
[Reply to this message]
|