I am looking for the best way to sort a multidimensional array, I want it sorted based on what the child array contains.
This is my array:
Array
(
[0] => Array
(
[id] => 2
[level] => 3
[lastAction] => "String Here"
[actionAt] => 23/03/2014
)
[1] => Array
(
[id] => 4
[level] => 5
[lastAction] => "Another String here"
[actionAt] => 24/3/2014
)
[2] => Array
(
[id] => 9
[level] => 1
[lastAction] => "String again"
[actionAt] => 01/01/2013
)
)
And I would like to sort the 3 main arrays based on the ActionAt from their child arrays, how is this possible?
I've read a bit about it and some say ksort and usort, but I have not been able to get it working properly.