It was difficult for me to understand this question. If you want to get the full name and first initial of the last name.
$firstwithlastnameinitial = substr($full_n, 0, strpos($full_n, ' ')) . substr($full_n, strpos($full_n, ' ') + 1, 1);
OR
list ($fname, $lname) = explode(' ', $full_n, 2); $lastwithfirstinitial = $fname . substr($lname, 0, 1);
If you want to get the full last name with the first initial of the first name:
$lastwithfirstinitial = substr($full_n, strpos($full_n, ' ') + 1, strlen($full_n)) . substr($full_n, 0, 1);
This should get the last name plus the first initial. Or something easier to read.
list ($fname, $lname) = explode(' ', $full_n, 2); $lastwithfirstinitial = $lname . substr($fname, 0, 1);
source share