Jan G.B. wrote:
You could try it with regular expression matching..
for example:
?php
preg_match_all('/([a-z]+|[a-z ]+)/i', $searchstring, $resultarray);
?
Regards
Thanks. That seems to create 2 duplicate arrays, though. Can it be
narrowed down to just array [0]?
2009/4/24 Adam Williams awill...@mdah.state.ms.us:
I have a form where users submit search terms and it explodes the terms into
an array based upon spaces. But, how can I have explode() keep words in
quotation marks together? For example, if someone enters on the form:
John Jill Judy Smith
2009/4/24 Adam Williams awill...@mdah.state.ms.us:
Jan G.B. wrote:
You could try it with regular expression matching..
for example:
?php
preg_match_all('/([a-z]+|[a-z ]+)/i', $searchstring, $resultarray);
?
Regards
Thanks. That seems to create 2 duplicate arrays, though. Can it
Jan G.B. wrote:
Yes, preg_match_all returns all matches and the subpattern matches
(the stuff inside the brakes)
You can ommit stop it by using (?:) instead of ()..
So: preg_match_all('/(?:[a-z]+|[a-z ]+)/i', $_POST[terms], $termsarray)
You might want to check out the regular expression
SO COOL...
Thanks too all
-Original Message-
From: Binay Agarwal [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 24, 2003 1:48 PM
To: Joe Harman
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] help with explode.
Okay... this probably isn't that hard to do... but I am just not sure
Okay... this probably isn't that hard to do... but I am just not sure to
do it... so i will ask you guys... i amsure someone is going to have a
one liner for me here!
I am making a survey/poll builder everything is dynamic... there is an
admin section where the user can make the new
6 matches
Mail list logo