Salut,
Un exemplu simplu ar fi asta:
Rezultat:Cod PHP:$array = array('tag1','tag2','tag3','tag4','tag1','tag2','tag5');
$tags = array_count_values($array);
foreach($tags as $tag => $cnt) echo $tag.' (de '.$cnt.' ori)<br>';
Cod:tag1 (de 2 ori) tag2 (de 2 ori) tag3 (de 1 ori) tag4 (de 1 ori) tag5 (de 1 ori)



Răspunde cu citat