My array is like:
Array
(
[0] => stdClass Object
(
[id] => 1
[name] => demo1
)
[1] => stdClass Object
(
[id] => 2
[name] => demo2
)
[2] => stdClass Object
(
[id] => 6
[name] => otherdemo
)
)
How can I convert the whole array (including objects) to a pure multi-dimensional array?
Have you tried typecasting?
There is another trick actually
You can have more info here
json_decodein the PHP manual, the second parameter is called assoc:Which is exactly what you’re looking for.
You may want to try this, too : Convert Object To Array With PHP (phpro.org)