mercredi 22 janvier 2020

how to get key of common value from single array [closed]

I want each of common value's key from single array only.

$array1=array("Orange","Apple","Banana","Orange","Apple");

expecting output : orange=>0, Orange=>3

I have used $counts = array_count_values($array1); but it is just counting.



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3aHCRvY
via IFTTT

Aucun commentaire:

Enregistrer un commentaire