Newline
Posted: Thu Jan 29, 2009 11:06 pm
Hi,
I'm new to php. I downloaded and installed the following:
1. php-5.2.8-win32 (zip file--I followed the manual installation steps from the manual)
2. apache httpd server 2.2.11.
I tested the installation using
It worked.
My problem is it cannot recognize a newline character (\n). For example,
The output is like this:
Hello World
It should be like this:
Hello
World
I tried using
It worked. But I am just confused why it doesn't work using the \n. Does it have something to do with the configuration of php/apache? Hope someone can shed a light on me.
Thanks.
--Ric
I'm new to php. I downloaded and installed the following:
1. php-5.2.8-win32 (zip file--I followed the manual installation steps from the manual)
2. apache httpd server 2.2.11.
I tested the installation using
Code: Select all
<?php
phpinfo();
?>My problem is it cannot recognize a newline character (\n). For example,
Code: Select all
<?php
echo "Hello \n";
echo "World";
?>Hello World
It should be like this:
Hello
World
I tried using
Code: Select all
<?php
echo "Hello" . "<br>";
echo "World";
?>Thanks.
--Ric