Thanks for all -- Re: [PHP] How to handle multiple lines in PHP?
| From: | david klein | Date: | Tue, 16 Jan 2001 16:57:17 +0000 |
| Subject: | Thanks for all -- Re: [PHP] How to handle multiple lines in PHP? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-34849@lists.php.net to get a copy of this message | ||
Hi, it works now! Thank everyone very much for the great help, especially Atom and others who helped me out.
Have a wonderful day!
Best Regards,
David
From: <atom@qosip.ttt.bme.hu> To: david klein <davidklein101@hotmail.com> Subject: Re: [PHP] How to handle multiple lines in PHP? Date: Tue, 16 Jan 2001 17:07:01 +0100 (CET) Hello David! Atom,_________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.comThank you very much for the help. I am using MySql, actually, in the database, there is no "\n". Idebugged it a little bit more, and found the followings: It seems that PHP took the three lines as one line (I think it can't recognize "\n" from the textarea input, and convert it automatically into a space char. Ok. I understand your problem. I created a Forum program, where I use this HTML tag as <textarea>. Solution: $szoveg contains your line from DB 123 456 789 $szoveg=ereg_replace("\n","<br>",$szoveg); Result is 123 456 789 :-) bye, AtomMore idea?Thanks again for helping me! DavidFrom: <atom@qosip.ttt.bme.hu> To: david klein <davidklein101@hotmail.com> Subject: Re: [PHP] How to handle multiple lines in PHP? Date: Tue, 16 Jan 2001 16:47:33 +0100 (CET)laterafter I get it through some php scripts, and put it into database,on,OFI try to display it, but it becomes(only one line): 123 456 789 Does anyone know how to handle this? One idea is to convert the <ENDLINE_________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.comCHAR> to "<BR>" before putting it into the database, but how can wedetectthe <END OF LINE CHAR> in PHP? Or is there any other ways?When you take it from database change \n to <BR> etc... Atom