Re[2]: [PHP] HTML to mysql - from msql to html
| From: | Miguel Cruz | Date: | Sun, 05 May 2002 22:29:49 +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-96189@lists.php.net to get a copy of this message | ||
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 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