Re: Split string

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Stut wrote:
Alternatively you could use split to break the string into the two parts, which is probably more efficient...

list($part1, $part2) = split('[ ,]', $myString);

Oops, this should have a third parameter...

list($part1, $part2) = split('[ ,]', $myString, 2);

-Stut

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux