Re: Remove quotes from form field
| From: | Matt Grimm | Date: | Mon, 05 Jan 2004 23:48:08 +0000 |
| Subject: | Re: Remove quotes from form field | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-173790@lists.php.net to get a copy of this message | ||
In the very simplest way? Just use a str_replace on the quotes:
$words=explode(" ", str_replace('"', '', strtolower($keywords)));
--
Matt Grimm
Web Developer
The Health TV Channel, Inc.
(a non - profit organization)
3820 Lake Otis Parkway
Anchorage, AK 99508
907.770.6200 ext. 686
907.336.6205 (fax)
E-mail: mgrimm@healthtvchannel.org
Web: www.healthtvchannel.org
"Vernon" <vernon@comp-wiz.com> wrote in message
news:20040105201327.24753.qmail@pb1.pair.com...
> 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 )
>
> Thanks