参数 | 描述 |
---|---|
array | 必需。规定要使用的数组。 |
<?php $people = array("Peter", "Joe", "Glenn", "Cleveland"); echo "The key from the current position is: " . key($people); ?>
输出:
The key from the current position is: 0
制作:
http://www.7di.net 生活网搜集整理 参考: http://www.w3school.com.cn/php/func_array_key.asp |