So I have this associative array (dump done with kint)
d
Instead of having the key "Conference
" repeating 3 times. I want to have it just once and sum the 3 values into one in order to have something like:
Conference : 4534
And same thing for all other keys that are repeating..
Is there a native function that can do that ?
A simple suggestion:
Update according to comments
You can run over them again:
You can try
Output
This option will group and sum values of all repeated indexes in an array.
Code here :
This will result into: