Tutorial Separate First and Last Name
$name = "John S Smith";
list($fname, $lname) = split(' ', $name,2);
echo "First Name: $fname, Last Name: $lname";
Works with or without middle name.
$name = "John S Smith";
list($fname, $lname) = split(' ', $name,2);
echo "First Name: $fname, Last Name: $lname";
Works with or without middle name.