Mega Code Archive
Loops through an indexed array of fruit names and creates a new array with the count of each fruit name
$fruit) {
@$fruit_count[$fruit]++;
}
asort($fruit_count);
foreach ($fruit_count as $fruit=>$count) {
echo "$fruit = $count\n";
}
?>