I have the following array:
$franchise_a_status[] = array(
'id' => $franchise['franchise_id'],
'text' => $franchise['franchise_surname']. ' ' .$franchise['franchise_firstname'].' '.'('.$distance.')'
);
The $franchise array is populated from the database, and the distance variable retrieves info from the Google Distance Matrix. I want the array sorted in order of distance - nearest to farthest.
I thought it was as easy as this:
asort($franchise_a_status);
Sadly I was wrong. How would I sort this array based on distance?