Thursday, May 7, 2009

Preserve Textarea Linebreak

Read in the forum regarding "how to preserve textarea linebreak" in PHP... I'm not a PHP programmer, I'm not sure. So.... searching online & found this method: nl2br()

I tried it out, and it is quite simple.

Have zipped it up for future reference~~ Might be useful.


oops...the previous script cannot handle DOUBLE QUOTE & SINGLE QUOTE.
Have added stripslashes() in order to cope for double quote & single quote.
Instead of nl2br(), we shd use nl2br(stripslashes($strText1)).

No comments:

Post a Comment