In addition to what was mentioned below, you can also wrap your text in
PRE/PRE tags to have it output exactly as you've formatted it:
echo PRE\n;
echo one\n;
echo two\n;
echo /PRE\n;
Actually, I don't think either of these methods is going to output what you
want. Even though \n is newline,
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
Robert napisal(a):
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.
This is the most basic of examples:
print 'one' ;
print \n ;
print 'two' ;
The output of this when accessed on my server
3 matches
Mail list logo