From the comments in the annotated manual on php.net (which is a very good place to look..):
function cmp($a, $b) {
return strcmp(strtolower($a), strtolower($b));
}
$fruits[] = "lemons";
$fruits[] = "apples";
$fruits[] = "grapes";
usort($fruits, "cmp");