When using sort, it sorts by ASCII code and not alphabetically, this might be what was intended but the function does not behave as might be expected, take the following example:
<?php
$test = array("AA","AC","AR","AJ","Ab");
asort($test);
var_dump($test);
?>
Does not ourput
AA,Ab,AC,AJ,AR
But infact
AA,AC,AJ,AR,Ab
Now this is due to Ascii Char codes. Perhaps a warning should be added to the manual if this behaviour stays the same.
James