http://ccl.flsh.usherb.ca/db/authors_under_study.php
or
$names = array ("john", "mary", "bill", "mary", "bill", "mary", "bill",
"john", "bill", "john");

1) How do I count the elements of $names to produce:

bill   4
john   3
mary   3

2) How do I store the counted elements into a new array? How do I create
this:

$new_array = array ("bill"=>4, "john"=>3, "mary"=>3)

I'm looking at http://www.php.net/manual/en/function.array.php
but not sure.

Reply via email to