Codice PHP:
$i=0
foreach (
$array as $value) { 
     
$vect=split(" ",$value);
     
$array[$i]=$vect[count($vect)-1];