This is a really bad idea.
There are tons of things that can go wrong if you're purely relying on letter case to signify something. And saving it all in another string just perpetuates the problem.
That said, you can mitigate (a small amount of) the badness by storing the new values separately, so as not to pass along unstructured information to the next unfortunate person who has to maintain your database. This code does that, while also allowing for multi-word first names (like "John Paul" or such).
I also made it handle these in array form, since I assume that you probably want to handle more than three names.
<?php
$string1 = "FARMER John";
$string2 = "OVERMARS DE Rafa Dafa";
$string3 = "VAN DER BELT Dick";
$strings = array(array('orig'=>$string1), array('orig'=>$string2), array('orig'=>$string3));
foreach($strings as $key=>$val){
$oldwords = explode(' ',$val['orig']);
foreach($oldwords as $word){
if(preg_match('/[a-z]/',$word)){
$firstname .= " ".$word;
}else{
$lastname .= " ".$word;
}
}
$firstname = trim($firstname);
$lastname = trim($lastname);
$strings[$key]['newfirst'] = $firstname;
$strings[$key]['newlast'] = $lastname;
$firstname = "";
$lastname = "";
}
print_r($strings);
?>