I have a string like this:
red yellow blue
and I want to get an array like this :
Array ( [0] => red [1] => yellow blue )
how to split at the first space in a string ? my code doesn't work
<?php
$str = "red yellow blue";
$preg = preg_split("/^\s+/", $str);
print_r($preg);
?>
please help me.