This is an array that looks for the first array and in that array has an element called ‘name’
usort($results, function($a, $b) {
return strcasecmp($a[0]['name'], $b[0]['name']);
});
For a simpler version (notice the array number [0] is missing now)
usort($data, function($a, $b) {
return strcasecmp($a['name'], $b['name']);
});
}