I want to split a string into two variables, the first word and the rest of the string. The first word will be only one of four different words.
$string = explode (' ', $string, 2);
$word = $string[0];
$string = $string[1];
The above seems to work, but I wonder if there is a better way.
aslum source
share