using usort to re-arrange multi-dimension array
- by Thomas Bennett
I have a large array:
[0] => stdClass Object
(
[products] => Array
(
[0] => stdClass Object
(
[body_html] => bodyhtml
[published_at] => 2012-12-16T23:59:18+00:00
[created_at] => 2012-12-16T11:30:24+00:00
[updated_at] => 2012-12-18T10:52:14+00:00
[vendor] => Name
[product_type] => type
)
[1] => stdClass Object
(
[body_html] => bodyhtml
[published_at] => 2012-12-16T23:59:18+00:00
[created_at] => 2012-12-16T10:30:24+00:00
[updated_at] => 2012-12-18T10:52:14+00:00
[vendor] => Name
[product_type] => type
)
)
)
and I need to arrange each of the products by the date they where created...
I've tried and failed all kinds of usort, ksort, uksort techniques to try and get it to be in a specific order (chronological) but failed!
any guidance would be most appreciated