PHP FOIZ

$total = array_sum($share);

$share = array_map(function($hits) use ($total) {
   return round($hits / $total * 100, 1) . '%';
}, $share);
Shadow