サンプル
$fruits = array (
"d"=>"lemon",
"a"=>"orange",
"b"=>"banana",
"c"=>"apple"'
);
ksort ($fruits);
reset ($fruits);
while (list ($key, $val) = each ($fruits)) {
echo "$key = $val\n";
}
出力
a = orange
b = banana
c = apple
d = lemon
$fruits = array (
"d"=>"lemon",
"a"=>"orange",
"b"=>"banana",
"c"=>"apple"'
);
ksort ($fruits);
reset ($fruits);
while (list ($key, $val) = each ($fruits)) {
echo "$key = $val\n";
}
a = orange
b = banana
c = apple
d = lemon