RE: [PHP] Special characters --> single quote

From: Date: Tue, 22 Aug 2000 15:15:24 +0000
Subject: RE: [PHP] Special characters --> single quote
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-12964@lists.php.net to get a copy of this message
> > $query = "UPDATE toto SET OBSERVATION = '".str_replace("'", > "''", $OBSERVATION)."' WHERE id = > > $number"; "UPDATE toto SET OBSERVATION = \"$OBSERVATION\" WHERE id = $number"; If you have " in your string you will then need to use addslashes James

« previous php.general (#12964) next »