Is there any way I can convert Windows new lines to Unix ones? The reason is so that when someone posts something on a website using a Windows computer, when I edit the file on a Mac all the lines are properly computed.
Thank you, Jacob
PHP_Chimp
7:42 pm on Oct 24, 2007 (gmt 0)
You can use str_replace [uk3.php.net] There is an example on the page for a similar function.
eelixduppy
9:16 pm on Oct 24, 2007 (gmt 0)
I would probably use preg_replace because you aren't going to be sure what newline characters are used. So the following should work: