Quoting strings

From: Date: Thu, 29 Nov 2001 12:12:00 +0000
Subject: Quoting strings
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-76002@lists.php.net to get a copy of this message
Hi all, I have a fnction that needs to quote a strings in php to make them easy to stick into an mysql db. I need to do basically "$msg", which is easy enough, but I would like to not quote strings that are already quoted and also escape any single or double quotes in the string. IS there a regex to do this that anybody knows of, or a php function that i;ve missed ? Ideas anybody ? Thanks in advance Jason -- Hofstadter's Law : "It always takes longer than you expect, even when you take Hofstadter's Law into account."

« previous php.general (#76002) next »