PHP treats all arrays as associative, so there aren't any built in functions. PHP将全部数组视为关联数组,所以没有任何内置函数。 Can anyone recommend a fairly efficient way to check if an array contains only numeric keys? 谁能推荐一种至关有效的方法来检查数组是否仅包含数字键? 数组
Basically, I want to be able to differentiate between this: 基本上,我但愿可以区分如下二者: app
$sequentialArray = array('apple', 'orange', 'tomato', 'carrot');
and this: 和这个: 函数
$assocArray = array('fruit1' => 'apple', 'fruit2' => 'orange', 'veg1' => 'tomato', 'veg2' => 'carrot');