At 7:33 AM -0500 1/23/01, Brian Clark wrote:
>Hello Matt,
>
>(MW == "Matt Williams") [EMAIL PROTECTED] writes:
>
>MW> $query_string = split("+",$search);
>
>$query_string = explode('+', $search);
>
>-Brian
>


Just to explain the error -

split() takes a regular expression for its first argument; '+' is a 
special character for regular expressions, and is not valid by 
itself. That's why you're getting an error. For more info on regular 
expressions, there have been links to good tutorials that pop up from 
time to time on this list; also, I think there are a few references 
mentioned in the online docs for the ereg_ and preg_ functions. You 
can also get the O'Reilly book 'Mastering regular expressions.'


That being said, though, explode() is probably a better function to 
use here. If you don't need the functionality of regexps, explode() 
is faster.

-steve

-- 
+--- "They've got a cherry pie there, that'll kill ya" ------------------+
| Steve Edberg                           University of California, Davis |
| [EMAIL PROTECTED]                               Computer Consultant |
| http://aesric.ucdavis.edu/                  http://pgfsun.ucdavis.edu/ |
+-------------------------------------- FBI Special Agent Dale Cooper ---+

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to