"00FF00", "blue"=>"0000FF"); // sort an array by its keys ksort($colors); // print out the values for(reset($colors); $index=key($colors); next($colors)) { print("$index : $colors[$index] \n"); } ?>" /> 
快捷搜索:

ksort

ksort

"FF0000",

"green"=>"00FF00",

"blue"=>"0000FF");

// sort an array by its keys

ksort($colors);

// print out the values

for(reset($colors); $index=key($colors); next($colors))

{

print("$index : $colors[$index]

\n");

}

?>

您可能还会对下面的文章感兴趣: