you can probably use in_array() and search each spot using a for loop

for($i = 0; $i < $arrayMax; $i++){
$total = 0;
if(in_array($array[$i]), $array){
$total = $total+1;
}
}

Somewhere along those lines.

EDIT: nevermind, just read your note, lol.


EDIT 2.0: was looking online, found something that may help.


Code: 
<?php 
function arrayDuplicate($array) 
{ 
return array_unique(array_diff_assoc($array1,array_unique($array1))); 
}; 
?> 
 
Example: 
<?php 
$arr1 = array('foo', 'bar', 'xyzzy', '&', 'xyzzy', 
'baz', 'bat', '|', 'xyzzy', 'plugh', 
'xyzzy', 'foobar', '|', 'plonk', 'xyzzy', 
'apples', '&', 'xyzzy', 'oranges', 'xyzzy', 
'pears','foobar'); 
 
$result=arrayDuplicate($arr1); 
print_r($result);exit; 
?> 
 
Output: 
 
Array 
( 
[4] => xyzzy 
[12] => | 
[16] => & 
[21] => foobar 
)
Using this it will tell you the location of the duplicates, using this you can count them up each time using $total or something
Bread Reviewed by Bread on . Count a function true/false foreach($filenames as $count){ $filedup=basename($count,'.txt'); $filedup=array($filedup); print_r (array_count_values($filedup)); } But this gives Array ( => 1 ) Array ( => 1 ) Array ( => 1 ) Array ( => 1 ) So the array_count_values function does not work because everything is in separate array and that seems to be from foreach. Rating: 5