Sort 2d array

how can i sort a multidimensional array created from preg_match_all?
$arr[$i][1] = string
$arr[$i][2] = number

i want to sort $arr[$i][1] and have the rest follow.