I have a php array object $images
if I print this array by print_r($images)
, I gets following structure.
Array
(
[0] => stdClass Object
(
[image_name] => 1.jpg
)
[1] => stdClass Object
(
[image_name] => 2.jpg
)
[2] => stdClass Object
(
[image_name] => 3.jpg
)
)
and I want to convert its structure as;
Array
(
[image_name] => stdClass Object
(
[0] => 1.jpg
[1] => 2.jpg
[2] => 3.jpg
)
)
Some one please suggest me a function to do that in php.