Re: Remove quotes from form field

From: Date: Tue, 06 Jan 2004 00:12:24 +0000
Subject: Re: Remove quotes from form field
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-173793@lists.php.net to get a copy of this message
Vernon wrote:
I'm having trouble returning the value less the quatation marks from the following:
     $words=explode(" ", strtolower($keywords));
I'm having the words from the form field put into an array. Problem is if the field contains something like
     trackworker AND "New York"
It seperates the words into the array as follows: Array ( [0] => trackworker [1] => "new [2] => york" ) Therefore not finding the words "new york" because they don't exist like that but rather without the quotaions. Question is how do I remove the quatation marks so it returns? Array ( [0] => trackworker [1] => new [2] => york )
Aren't the quotes there for a reason, though? How are you going to know to search for "new" and "york" only when they are next to each other? -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com

« previous php.general (#173793) next »