Any reason not to use asort or equivalent? From the php manual:
$fruits = array ("d"=>"lemon", "a"=>"orange", "b"=>"banana", "c"=>"apple");
asort ($fruits);
reset ($fruits);
while (list ($key, $val) = each ($fruits)) {
echo "$key = $val\n";
}
This example would display:
fruits[c] = apple
fruits = banana
fruits[d] = lemon
fruits[a] = orange
Would this do it?
Dave
===========================================
http://badblue.com/helpphp.htm
Free small footprint web server for Windows
PHP, P2P file-sharing, transcoding and more