Re[2]: [PHP] HTML to mysql - from msql to html

From: Date: Sun, 05 May 2002 22:01:15 +0000
Subject: Re[2]: [PHP] HTML to mysql - from msql to html
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-96175@lists.php.net to get a copy of this message
Hey PHP General List, ok i solwed the problems with line breaks.... but i didn't use nl12br() function. i did like this: $newz = str_replace("\n","<br>",$myrow[3]); now i am having problems with spaces text is: --------------- bla bla bla foo --------------- and shows: --------------- bla bla bla foo --------------- what do i have to do to get all those spaces? as i understand(english is weak) nl12br() is for breaks only. what about spaces? :---- MC> On Sat, 4 May 2002, Mantas Kriauciunas wrote: >> I have hare a little problem. Well i have in the page <TEXTAREA> >> thingy and there i wrote text like that(between lines): >> >> ---------------------- >> foo bar >> >> more foo bar >> ---------------------- >> >> now i do msql_query("UPDATE............."); and it sets into the >> database with just space. and when i take it out from database there >> is no empty line in the middle. MC> View the source of the page displaying the retrieved data. If the text MC> displays on multiple lines there, then you just need to call nl2br() on MC> the string to convert internal line breaks to HTML breaks. MC> If the text does not show line breaks in the source (or when you use the MC> mysql CLI to query), then you need to change the parameters of the MC> <TEXTAREA>. Probably <textarea wrap="soft"> but I'm not 100% sure MC> offhand. MC> miguel :------------------------------: Have A Nice Day! Mantas Kriauciunas A.k.A mNTKz Contacts: Mantuks@attbi.com Http://mntkz-hata.visiems.lt

« previous php.general (#96175) next »