Re: [PHP] Simple (??) control structure problem From: Christopher Kaminski (chronoszero <email protected>)
Date: 07/15/01

Thanks alot! I didn't do that because I wasn't aware of the nl2br()
function.

I just taught myself php last weekend. There's still plenty for me to
learn.

"Yz James" <liljim <email protected>> wrote in message
news:20010715194530.98967.qmail <email protected>
> Hi Christopher,
>
> Why not use nl2br() and trim() ?
>
> $string = trim($string); // Clear any unwanted white space (trailing and
> leading);
> $string = nl2br($string); // Add line breaks where necessary
>
> echo "$string"; // Voila
>
> James
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe <email protected>
For additional commands, e-mail: php-general-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>