Re[2]: [PHP] HTML to mysql - from msql to html
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 offhand. MC miguel :--: Have A Nice Day! Mantas Kriauciunas A.k.A mNTKz Contacts: [EMAIL PROTECTED] Http://mntkz-hata.visiems.lt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: Re[2]: [PHP] HTML to mysql - from msql to html
On Monday 06 May 2002 06:01, Mantas Kriauciunas wrote: 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? replace the spaces with a non-breaking space: nbsp; -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* It is a lesson which all history teaches wise men, to put trust in ideas, and not in circumstances. -- Emerson */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP] HTML to mysql - from msql to html
On Sun, 5 May 2002, Mantas Kriauciunas wrote: 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? I think you're going to have a good time with pre/pre. You could try swapping nbsp; for each space but they're sometimes wider than normal spaces and I suspect may have other weird side effects as well. As a print designer in a former life, by the way, the thought of you trying to format something with spaces makes my skin crawl. But I'm trying to keep my cool. miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: Re[2]: [PHP] HTML to mysql - from msql to html
now i am having problems with spaces text is: --- bla bla bla foo --- and shows: --- bla bla bla foo --- Plain old HTML ignores white space. You do understand this? To include what you want you'll need to substitute spaces for non-breaking spaces (nbsp;) but I wouldn't advise it. I'd be suggesting that if your content requires such things that you reconsider how you are doing your content. CYA, Dave -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php