判断最后一个元素if(current($a) == end($a)){ echo 'aaa'; }获取最后一个key$a = array('a'=>1,'b'=>2);end($a)echo key($a);