I am looking for a function, if any, to preserve or merge values into similar key, but no luck so far.
array_combine simply removes the value:
array_combine(array('a','a','b'), array(1,2,3));
Returns:
Array
(
[a] => 2
[b] => 3
)
Expected:
Array
(
[a] => 1,2
[b] => 3
)
Any hint is very much appreciated.
Thanks
UPDATE: I didn’t know, and didn’t articulate better about the merged values (1,2), but then I had better accepted Jeroen array of values for easier breakdowns of possible array of values.
Thanks to everyone who has kindly helped.
This:
Returns: