RE: formatting paragraphs in to strings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Good point.  Only problem is, if someone hit enter a-million times,
> you would end up with a-million spaces where the "\n" characters were.
>  To take care of that repetition, maybe something like:
> 
> 
> while (strpos($textarea_text, "\n\n")) {
>      .....
> }
> 
> 
> would be one way you could do it.

Ordinarily most browsers render multiple consecutive spaces as a single
space. This doesn't mean that it's not a good idea to remove them, just that
not doing so shouldn't effect the way the text is displayed in the div tag,
as the original poster mentioned was his intention.

Regards,

Murray

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux