Is there a way to use array_multisort with a custom order by? I need the results to display in date order with the first date being the date closest to today's, as you can see from the code below the matchDate field comes through as a string which I later convert to a date value.
foreach($matchLists as $matchList)
{
$fixtures[] = $matchList['matchDate'];
}
array_multisort($fixtures, SORT_DESC, $matchLists);
$newlist = array();
foreach($matchLists as $key => $matchitem)
{
if(array_key_exists('matchDate', $matchitem))
{
$newlist[$matchitem['matchDate']][$key] = ($matchitem);
}
}
foreach($newlist as $key => $value)
{
$fixtureDate = date('D j M Y ga', strtotime($key));
}