|  | Posted by Rik on 01/31/07 21:17 
Vincent <newsgroup@homeart.cjb.net> wrote:> 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
 > echo("line1\n");
 > echo("line2");
 >
 > or
 >
 > <?php
 > $str =3D <<<EOD
 > Example of string
 > spanning multiple lines
 > using heredoc syntax.
 > EOD;
 > echo($str);
 > ?>
 
 While I'm a fan of heredoc, just using single quotes will also work.
 -- =
 
 Rik Wasmus
 [Back to original message] |