PHP将所有数组视为关联数组,因此没有任何内置函数。有人能推荐一种比较有效的方法来检查数组是否只包含数字键吗?
基本上,我希望能够区分这一点:
$sequentialArray = array('apple', 'orange', 'tomato', 'carrot');
这是:
$assocArray = array('fruit1' => 'apple', 'fruit2' => 'orange', 'veg1' => 'tomato', 'veg2' => 'carrot');
阿晨1998
FFIVE
相关分类