I'm trying to sort this array by the date but the array is merged and has two different types of date.
[0] => Object
[Something] => hey
[date]=>2010-01-03
[1] => Object
[something] => heyagain
[somethingelse] => heythere
[posted_date] => 2011-08-22
I want this array to sort the whole array by date and posted date but the array comes out in order as:
Array1=>(date1,date2,date3) Array2=>(date1,date2,date3)
For instance in (Array2,date2) may be before (Array1,date1) but it does not sort that way. I want to see
Output=>Array2(date1),Array2(date2),Array1(date1),Array2(date3),Array1(date2),Array1(date3
I have tried array_multisort($merge, SORT_NUMERIC, $arg, 'posted_date', SORT_DESC, 'date', SORT_DESC) and a few other but I can't get it to work. I hope this isn't confusing anyone.
array_walk()andarray_map()date#values in your arrays relate to? What do you mean by two different 'types' of dates?