$array
=
[
1 => 2,
'hello' => 2,
'world' => 1,
]
#1
|
array_count_values
|
([0 => 1, 1 => "hello", 2 => 1, 3 => "world", 4 => "hello"])
|