Re: Newlines don't work.
- From: Vincent <newsgroup@xxxxxxxxxxxxxxx>
- Date: Wed, 31 Jan 2007 15:23:33 GMT
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
- Follow-Ups:
- Re: Newlines don't work.
- From: Rik
- Re: Newlines don't work.
- References:
- Newlines don't work.
- From: lister
- Newlines don't work.
- Prev by Date: Newlines don't work.
- Next by Date: Re: redirection question
- Previous by thread: Newlines don't work.
- Next by thread: Re: Newlines don't work.
- Index(es):