Re: Extract data
| From: | Jim | Date: | Tue, 04 Dec 2001 17:03:31 +0000 |
| Subject: | Re: Extract data | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-76547@lists.php.net to get a copy of this message | ||
The pipe "|" is a regex special character that allows you to specify multiple options (as in "1|0" will find 1 or 0. Your code will work if you escape the pipe as such...
25: list(q1,q2,q3,q4,q5)= split ("\|", $answer, 5);
But, it won't work unless you put the $ in front of your variables in your list constructor....
Jim
Content-type: text/plain; Content-encoding: base64 Hello guys I'm making poll script that stores data like this: 0|0|0|0|0 But i'm getting this error all the time: Warning: unexpected regex error (14) in c:\program files\apache group\apache\htdocs\eztatic\poll.php on line 25 25: list(q1,q2,q3,q4,q5)= split ("|", $answer, 5); Could any help Thank you very much in advance ----------------------------------------- Hot Mobiil - helinad, logod ja piltsõnumid! http://www.hot.ee -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net-- Jim Musil --------- Multimedia Programmer Nettmedia ------------- 212-629-0004 jim@nettmedia.com