[PHP] Re: Split string

2007-05-03 Thread itoctopus
if ($your_string !== ''){ $arr_string = explode(',', $your_string); $first_part = $arr_string[0]; array_shift($arr_string); $second_part = implode(',', $arr_string); } -- itoctopus - http://www.itoctopus.com "Lester Caine" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTEC

[PHP] Re: Split string

2007-05-02 Thread Al
Look at split() and explode(). Lester Caine wrote: Can someone with a few more working grey cells prompt me with the correct command to split a string. The entered data is names, but I need to split the text up to the first space or comma into one string, and the rest of the string into a se