RE: Forms and viewing Text Area

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

 



--- "Ford, Mike" <M.Ford@xxxxxxxxxxxxxx> wrote:

> echo nl2br(htmlspecialchars($text)) is my usual
> mantra for this.
> 
nl2br will give you back the correct formatting, but
will leave <br/>'s in the output.

I just went through this issue the other day, what I
found worked for me was:

htmlspecialchars('string'),ENT_NOQUOTES);
Note- check the available parameters for
htmlspecialchars. I used ENT_NOQUOTES because I wanted
to preserve the single and double quotes in my text.

Hope this helps.

Stuart

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