My array:
$MY_ARRAY =
Array
(
[0] => Array
(
[0] => 2861
[1] => Array
(
[start_month] => 6
[start_year] => 1970
[end_month] => 12
[end_year] => 1990
[experience_info] => "Practically a random string"
)
)
)
And I would like to sort $MY_ARRAY
direct children by their inner contents,
ideally in an order of start_year, start_month, end_year, end_month. I guess I could use the array_multisort()
somehow, but I don't know how. Does anyone know how to deal with this?
Thanks.
EDIT: As it showed up, the solution was nice and simple, what I didnt know is that during the comparsion in callback-compare-function you can go to the deeper structure - so if your deeper than lvl-1 indexes remains always the same (my case) that is how to do it :)