I have an array that looks like this:
Array
(
[0] => Array
(
[594576] => 604329
)
[1] => Array
(
[594576] => 594577
)
)
And I would like to order it grouping by its key as the title says and adding the key as value too and part of the new order, this is how the array should look in the end
Array
(
[0] => Array
(
[0] => 594576
[1] => 604329
[2] => 594577
)
)
Making the key as the first value, I have tried this without success looking info here on SO in questions like this
Group array values based on key in php?
But this didn't help me, I'm not expert using PHP and I hope you can help me to achieve this or guide me about how I need to do first, thank you.