I assume that somewhere after this code you actually generate a dropdown list.
What do you do that with?
If you first make an hash, sorry, associatve array of the names and the job/manager/thingies.
Somewhere in the objects you retrieve there is no doubt some getter-function with which you can get the name in the object.
$assarr = array();
foreach ( $managers as $manager )
{ $assarr[$manager->getName()] = $manager;
}
and then you sort the associative array by its keys ( the names )
ksort( $assarr );
after that you use your associative arrays order to show the managers/job/thingies in the right order
No idea how you do that, but let's say you do with method 'render':
foreach ( $asarr as $name, $object )
{ $object->render();
}
Something like this?
O.