[PHP] Return Character in a Text File?
I have a slight problem. Is there anyway to make a text file with a return character that doesn't show up in windows notepad as a gibberish character and actually puts a return in it? Right now I'm using the \n for the return but it doesn't get read in notepad as a return so the string data is one long line instead of multiple lines. Is there any other way of doing this? Code I am using: $data = ; //loop $data .= $firstName, $lastName, $email, $gender, $bday, $phone, $zip,\n; //end of loop Thanks!
Re: [PHP] Return Character in a Text File?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 If you use \r\n instead of \n notepad should be fine. Winblows uses CRLF for everything... On Thursday 27 March 2003 10:07 am, Jay Paulson wrote: I have a slight problem. Is there anyway to make a text file with a return character that doesn't show up in windows notepad as a gibberish character and actually puts a return in it? Right now I'm using the \n for the return but it doesn't get read in notepad as a return so the string data is one long line instead of multiple lines. Is there any other way of doing this? Code I am using: $data = ; //loop $data .= $firstName, $lastName, $email, $gender, $bday, $phone, $zip,\n; //end of loop Thanks! - -- Cats are intended to teach us that not everything in nature has a function. - -Garrison Keillor -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE+g0BH/rncFku1MdIRAnwKAKCftHhBGBiE/1dyv4DqmX+wEEDgHwCeNF4a vISgVvWe+vKX5M7AzrSAeV4= =uWAU -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Return Character in a Text File?
On 27-Mar-2003 Jay Paulson wrote: I have a slight problem. Is there anyway to make a text file with a return character that doesn't show up in windows notepad as a gibberish character and actually puts a return in it? Right now I'm using the \n for the return but it doesn't get read in notepad as a return so the string data is one long line instead of multiple lines. Is there any other way of doing this? Code I am using: $data = ; //loop $data .= $firstName, $lastName, $email, $gender, $bday, $phone, $zip,\n; //end of loop notepad wants '\r\n' for an end of line. IIRC wordpad (or whatever they calling it this week) will grok bare linefeeds. Thanks! Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. (53kr33t w0rdz: sql table query) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php