RE: [PHP] how do you erase quotes from variable?

From: Date: Fri, 26 Jan 2001 06:44:44 +0000
Subject: RE: [PHP] how do you erase quotes from variable?
Groups: php.general 
Request: Send a blank email to php-general+get-36789@lists.php.net to get a copy of this message
> I have a variable(s) that hold the string: > > "name" > > and I'd like to kill the quotes so it contains: > > name > > I am aware of the strlen() function but can find the concant > > Little Help? > > Mike If you *know* the variable is quoted you could also do: $new = substr($variable, 1, -1); I think this would be faster if you were doing a zillion of them as it doesn't have to find the quotes. Dustin

« previous php.general (#36789) next »