Re: Newlines don't work.
- From: Rik <luiheidsgoeroe@xxxxxxxxxxx>
- Date: Wed, 31 Jan 2007 22:17:36 +0100
Vincent <newsgroup@xxxxxxxxxxxxxxx> wrote:
lister schreef:Hi,echo("line1\n");
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("line2");
or
<?php
$str = <<<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
.
- References:
- Newlines don't work.
- From: lister
- Re: Newlines don't work.
- From: Vincent
- Newlines don't work.
- Prev by Date: Re: Newlines don't work.
- Next by Date: Re: working with array with floats
- Previous by thread: Re: Newlines don't work.
- Next by thread: Re: Newlines don't work.
- Index(es):
Relevant Pages
|