Re: [PHP] help with explode()

2009-04-24 Thread Adam Williams
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]?

Re: [PHP] help with explode()

2009-04-24 Thread Jan G.B.
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

Re: [PHP] help with explode()

2009-04-24 Thread Jan G.B.
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

Re: [PHP] help with explode()

2009-04-24 Thread Adam Williams
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

RE: [PHP] help with explode.....

2003-07-25 Thread Joe Harman
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

Re: [PHP] help with explode.....

2003-07-24 Thread Binay Agarwal
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