📅  最后修改于: 2022-03-11 14:54:24.238000             🧑  作者: Mango
$assocarray = array('a' => 1, 'b' => 2, 'c' => 3);
$keys = array_keys($assocarray);
rsort($keys);
while (!empty($keys)) {
$key = array_pop($keys);
echo $key . ' = ' . $assocarray[$key] . '
';
};