>From: "Kristoffer Strom" <[EMAIL PROTECTED]>
>Sent: Sunday, August 11, 2002 10:42 AM
>Subject: [PHP] Problem with echo

> Got a problem when echo:ing a variable containing alot of text.
> When echoing it backslashes ("\") every apostrophe ("'") and quote (").
> This I don't like.
> And I can't use HTMLSPECIALCHARS or HTMLENTITIES since the text has alot
> html tags that I want to keep intact.

Turn off magic_quotes_gpc in php.ini or .htaccess or use stripslashes() on
the fields.  The quotes are there for easy database updates/inserts but
cause trouble if you have to re-echo the data out.   If you insert these
fields into a db, and have turned of magic_quotes_gpc, you'll need to use
addslashes on each field. Otherwise you get new problems.

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

Reply via email to