In php…How can I sort the following example by “attachment_id” under each individual array [image][videoembed][etc] So [image] would be ordered 691,692,699 and then [videembed] would be similarly ordered if there were more than 1…etc, etc.
I really hope that makes sense.
Thank you very much all.
(
[image] => Array
(
[0] => stdClass Object
(
[title] => 77007_433592946695465_6701985_n.jpg
[attachment_id] => 699
)
[1] => stdClass Object
(
[title] => 253163_10151127010009522_736212653_n.jpg
[attachment_id] => 692
)
[2] => stdClass Object
(
[title] => 263893_10150217397944522_4550001_n.jpg
[attachment_id] => 691
)
)
[videoembed] => Array
(
[0] => stdClass Object
(
[title] => YouTube
[attachment_id] => 692
)
)
[] => Array
(
[0] => stdClass Object
(
[title] => yada.jpg
[attachment_id] => 688
)
)
)
So, this example would result as such:
(
[image] => Array
(
[2] => stdClass Object
(
[title] => 263893_10150217397944522_4550001_n.jpg
[attachment_id] => 691
)
[1] => stdClass Object
(
[title] => 253163_10151127010009522_736212653_n.jpg
[attachment_id] => 692
)
[0] => stdClass Object
(
[title] => 77007_433592946695465_6701985_n.jpg
[attachment_id] => 699
)
)
[videoembed] => Array
(
[0] => stdClass Object
(
[title] => YouTube
[attachment_id] => 692
)
)
[] => Array
(
[0] => stdClass Object
(
[title] => yada.jpg
[attachment_id] => 688
)
)
)