Newbie - newline problems
am 07.04.2008 04:03:18 von Pat WillenerHi all,
New to the group, not new to newsgroups. Getting started learning PHP
4. Solved my first problems by modifying someone else's code to
accomplish what I needed. Liked it, so now I'm trying to actually
"learn" it
of Perl and am decent wiht Visual Basic 6 (non -NET version) which is
absolutely no help.
OK, my problem. I can NOT get '/n', newline, to work. I suspect it's
a setup problem but don't know where to look.
Locally: Xampp Apache server/PHP 4 & 5 & SQL, etc. on XP Pro SP2+.
My online web site itself has full implementation of 4 & 5 as well
on Apache. Set for PHP 4 also.
I'm seeing the same problems uploading to my web site as I see
locally here on my computer, with Xampp rendering my PHP. It's very
simple code:
Code:
-------------------
echo "Hello World";
echo "This spans
multiple lines. The newlines will be
output as well";
echo "This spans\nmultiple lines. The newlines will be\noutput as
well.";
?>
-------------------
Firefox/IE7 Output:
-------------------
Hello WorldThis spans multiple lines. The newlines will be output as
wellThis spans multiple lines. The newlines will be output as well.
-------------------
It's one long line of output, devoid of any newlines whatsoever. Just
one long line with spaces removed where the "/n"s appear.
WHAT the devil is the problem? .ini? Xampp?
The installation is default, which was supposed to be all I needed.
I've intentionally changed nothing but those are famous last words, I
guess. I don't even know for sure where to start looking for the
problem.
TIA for any assistance
--
Regards,
Twayne