php natsort有2个数组

I have this code :



The first array called $values_total[] is numeric and have the number of simple txt files (154512452.txt, etc), with information inside, in a single line, but this array have only numeric values.

The second array called $values_total_data[] have the data line for each file

If i want, i can use natsort for get natural order by the letters or numbers

The problem it´s in this case i use this code for create select as in this example :

print "<select>";
foreach($values_total_data as $vals)
print "<option value='".$vals."'>".$values_total_data[$n]."</option>";
print "</select>";

But the problem it´s that natsort order files by his id numeric number, and i need the order it´s for words inside in each file for get in first the title start for "a" "b", etc, but in select the option value must be numeric, and this numbers are inside $values_total[]

And i don´t know how i can combinate this for order by text and no by id of each text file, regards .

dongzhazhuo0572 请你举个例子
大约一年之前 回复
dtz30833 array_multisortwithSORT_NATURAL
大约一年之前 回复
Csdn user default icon