<?php
$array = array (
array("Isabel","7","7","10","6","4"),
array("Vicente","4","7","5","4","5"),
array("Manuel","3","5","6","1","2"),
array("Pedro","2","7","9","2","1"),
array("Ana","6","1","2","8","5")
);
$resultado=array_map(function($el) {
array_push($el, array_sum(array_slice($el, 1)));
return $el;
}, $array);
usort($resultado, function($a,$b) {
return ($a[6] < $b[6]) ? -1 : ($a[6] == $b[6]) ? 0 : 1;
});
?>
<table border="1">
<tr>
<th align="left">Vendedor</th>
<th align="left">L</th>
<th align="left">M</th>
<th align="left">X</th>
<th align="left">J</th>
<th align="left">V</th>
<th align="left">Total</th>
</tr>
<?php
for ($i=0; $i < count($resultado); $i++) {
echo "<tr>";
for ($j=0; $j <= 6; $j++) {
echo "<td>".$resultado[$i][$j]."</td>";
}
echo "</tr>";
}
?>
</table>