$val) { $total += $val['count']; }
// Sort the data by most hits
function compare($a, $b) {
if ($a['count'] == $b['count']) { return 0; }
else return (($a['count'] < $b['count']) ? 1 : -1);
}
uasort($names, 'compare');
// Lets start our web page
?>
Specific Browser Statistics
Specific Browser Statistics
| No. |
Hits |
Browser |
Cuml |
|
$val) {
echo "\n";
// The Number
echo '| ', $count++, " | \n";
// The Count
echo "{$val['count']} | \n";
$cuml += $val['count'];
// The Percent
printf(" %.2f%% | \n", 100.00 * ($val['count'] / $total));
// The Name
echo " {$one}";
// If it has subs ...
if ($val['subs']) {
// Print them
echo "\n";
// Sort them ...
arsort($val['subs']);
foreach ($val['subs'] as $sb => $sbnum) {
echo "\n";
// The hits
echo "| {$sbnum} | \n";
// The %
printf(" %.2f%% | \n", 100.00 * ($sbnum / $val['count']));
// The Name
echo " {$sb} | \n";
echo " \n";
}
echo " ";
}
// Finish the Name
echo " | \n";
// The cuml %
printf(" %.2f%% | \n", 100.00 * ($cuml / $total));
print "
\n";
}
// End everything up ...
?>
Statisics generated by specific_browser.php v1.0