获取array最后一个key

来源:互联网 发布:淘宝怎么设置客服 编辑:程序博客网 时间:2024/05/21 20:27
$arr = array(
    
'fruit1' => 'apple',
    
'fruit2' => 'orange',
    
'fruit3' => 'grape',
    
'fruit4' => 'apple',

);

end($arr);

echo key($arr);

0 0
原创粉丝点击