Page 1 of 1
\n question
Posted: Tue Jun 25, 2002 4:05 pm
by Sevengraff
I use \n a lot, but when I view the file's source, PHP doesn't put things on a new line, all the editors see is a box. Is there another way to do a carrage return?
Posted: Tue Jun 25, 2002 6:17 pm
by EvilWalrus
what editor are you using?
Posted: Tue Jun 25, 2002 6:37 pm
by sam
The new line characters used by windoes is \r\n rather than just the \n used by windows... So if you are viewing the file with a windows editor it will not skip to the next line...
Sam
PS Macintost uses \r
Posted: Tue Jun 25, 2002 8:27 pm
by lc
Yup use \r\n and you'll be fine.
I had the same problem and haven't encoutered it since I switched from \n to \r\n.
and thx for the explanation sam I didn't have the problem on my unix server/host but only on my windows system on which I write my scripts.. now I understand it

Posted: Tue Jun 25, 2002 9:11 pm
by Sevengraff
Thanks, that will help!