I have an array:
$input = array(1,2,3,4,6,5,3,6)
and I want the key/value pairs to be flipped. This can be done by using the array_flip() function. $flipped = array_flip($input)
If in the original array has 2 or more same values (in this case number 6)how can I return it in an array?
array= ([1]=0,[2]=>1,[4]=>2,[6]=>array(3,6),[5]=>4,[3]=>5)
I tried to use array_count_values() but can't figure out how to do it?