I have an array..
$test = array(\"def\", \"yz\", \"abc\", \"jkl\", \"123\", \"789\", \"stu\");
if I run sort() on it I get
In the following code is separate the data in two arrays: one is numerical the other is not and sort it and merge it.
$arr1 = $arr2 = array();
$foreach ($arr as $val) {
if (is_numeric($val)) {array_push($arr2, $val); }
else {array_push($arr1, $val);}
}
so you have to separate arrays whit numeric and non-numeric
sort($arr2);
sort($arr1);
$test = array_merge($arr2,$arr1);