Re: Problem with echo

From: Date: Sun, 11 Aug 2002 14:52:24 +0000
Subject: Re: Problem with echo
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-112031@lists.php.net to get a copy of this message
>From: "Kristoffer Strom" <kristoffer@kristoffer.com> >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 of > 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.

« previous php.general (#112031) next »