$test = "12,22 43 76 93 5 pass blahblahblahblah blah blah";
How would I split this string so I get :
[0] = 12,22 43 76 93 5
[1] = pass
[2] = blahblahblahblah blah blah
The $test string changes. the number of characters before and after pass can change and can include letters or numbers.
'pass' isn't always at the same point in the string and could appear more than once. But I want to split at the first match.
ie :
$test = "148 35 3 pass foo bar foo bar pass 123 foo bar";
[0] = 148 35 3
[1] = pass
[2] = foo bar foo bar pass 123 foo bar
I had tried explode() but that matches all occurrences of 'pass' and removes it in the process..
Any ideas ?
Thanks