Newline character problem...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm new to PHP but not programming in general. I have used C++ for a while
and I'm familiar with the newline character as it's basically the same in
PHP. Whenever I print something with a newline character in it all it
produces is a space between whatever two things I'm printing. I'm running
php 5.1.1 running on FreeBSD 6 with apache 2.2.0. All the latest versions
installed today.

This is the most basic of examples:

print 'one' ;
print "\n" ;
print 'two' ;

The output of this when accessed on my server is: one two
It should be: one
                   two

I've tried using printf as well but to no avail. It just adds a space
between the outputs. I've also tried using different browsers but still get
the same result. What am I doing wrong? Could this a php configuration
issue? Apache maybe?

Thanks,

Rob

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux