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]?

preg_match_all('/([a-z]+|"[a-z ]+")/i', $_POST["terms"], $termsarray);
echo $_POST["terms"]."<br>";
print_r($termsarray);

displays:

John Jill "Judy Smith"
Array ( [0] => Array ( [0] => John [1] => Jill [2] => "Judy Smith" ) [1] => Array ( [0] => John [1] => Jill [2] => "Judy Smith" ) )


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to