I have this code :
$values_total[]=$file;
$values_total_data[]=$cmd_[$n];
natsort($values_total);
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>";
$n=0;
foreach($values_total_data as $vals)
{
print "<option value='".$vals."'>".$values_total_data[$n]."</option>";
$n++;
}
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 .