You can use array_multisort
Update based on your code:
$limit=10;
foreach ($stores as $key => $row) {
$store[$key] = $row['name'];
$visitor[$key] = $row['visitor'];
}
array_multisort($visitor, SORT_DESC, $store, SORT_ASC, $stores);
$stores = array_chunk($stores, $limit);
foreach ($stores as $store) {
echo $store['name'];
echo number_format($store['visitor']);
}