suggested plan of attack:
<pre>
<?
class MyObject {
function MyObject($t = 'none')
{
$this->$myTag = $t;
}
}
$myArray = array();
for ($i = 1 ; $i < 11 ; $i++)
{
$myobj = new MyObject( str_pad('n', $i, 'x') );
$myArray[ $myobj->$myTag ] = $myobj;
}
print_r( array_count_values(array_keys($myArray)) );
?>
to sum up:
assuming each instance of an object you create has some sort of tag, e.g.,
$this->$myTag=get_class($this)
..you should be set. objects dont have value to compare the way strings and integers do, so, $myTag's value is arbitrary.