You should probably use the third (optional) argument of explode
:
list ($first, $last) = explode(" ", $string, 2);
That said, splitting on spaces is going to work on a lot of human names, but will also fail for quite significant percentage if you take the global view. There's nothing wrong with doing it as a practical solution to a particular problem, just don't expect that it will always work correctly.