. I have two array
First One
Array
(
[0] => Array
(
[date] => 2012-01-10
[result] => 65
array_merge
your arrays and then use the following code as an example of how you can sort it.
function sortDate($val1, $val2)
{
if ($val1['date'] == $val2['date']) {
return 0;
}
return (strtotime($val1['date']) < strtotime($val2['date'])) ? -1 : 1;
}
$array = array(
array('date' => '2012-01-10'),
array('date' => '2011-01-10'),
array('date' => '2012-01-01')
);
usort($array, "sortDate");
print_r($array);