|
Posted by Jerry Stuckle on 03/21/06 21:08
Stephen Kay wrote:
> learning php here - I'm echoing some debug code, and I cannot seem to make
> the newline character work.
>
> For example, I tried this:
>
> echo "supposedly, this will \nbe on \nmultiple lines.";
>
> which, according to the php manual, should produce this:
>
> supposedly, this will
> be on
> multiple lines.
>
> But it doesn't work! It's all on the same line. What obvious thing am I
> missing?
>
Display your html source. You'll see the newlines there.
This isn't a PHP problem - it's how HTML works. Newline characters are
ignored. Instead, you need to use <br> to start a new line.
See the nl2br() function.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|