Re: Line breaks in form

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

 



On Mon, 29 Nov 2004 12:29:59 -0500, Chris Farrugia
<chrisfarrugia@xxxxxxxxxxxxxxxxxx> wrote:
> On one of my forms to send email, I have multiple line breaks with different
> paragraphs.  I looked up the nl2br function and that looks like an option,
> but I would ideally like to wrap these paragraphs inside <p></p> tags.  Is
> there a way to do this easily?  Any advice would be greatly appreciated.

explode() the text by the "\n" character, this will give you an array.
 Iterate over the array and add your <p> tags there.


-- 
Greg Donald
Zend Certified Engineer
http://gdconsultants.com/
http://destiney.com/

-- 
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