Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
May 16, 2005, 8:06 pm
rate this thread
I'm writing a function that parses a nested list string that might look
( "HELLO WORLD!" 1231231 awesome ( 1 2 ) )
I wrote the logic already and it starts by splitting the string by the
space character (or tab or newline).
ex... $tklist = preg_split("/\s|\n|\t/", $str);
This works except in the string case, where "HELLO WORLD!" should not
be two parts. How do I split by spaces but keep phrases inside quotes
in tact? Is there an easy way to do this?
- » PHP pages display in all Windows browsers and NO Linux browsers!
- — Previous thread in » PHP Scripting Forum