PHP key() 函数
PHP 教程
· 2019-01-22 19:43:10
实例
从当前内部指针位置返回元素键名:
<?php
$people=array("Peter","Joe","Glenn","Cleveland");
echo "The key from the current position is: " . key($people);
?>
$people=array("Peter","Joe","Glenn","Cleveland");
echo "The key from the current position is: " . key($people);
?>
定义和用法
key() 函数从当前内部指针位置返回元素键名。
如果错误,函数返回 FALSE。
语法
key(array)
参数 | 描述 |
---|---|
array | 必需。规定要使用的数组。 |
技术细节
返回值: | 返回当前内部指针所指向的数组元素的键名。 |
---|---|
PHP 版本: | 4+ |
点击查看所有 PHP 教程 文章: https://www.codercto.com/courses/l/5.html
Web Applications (Hacking Exposed)
Joel Scambray、Mike Shema / McGraw-Hill Osborne Media / 2002-06-19 / USD 49.99
Get in-depth coverage of Web application platforms and their vulnerabilities, presented the same popular format as the international bestseller, Hacking Exposed. Covering hacking scenarios across diff......一起来看看 《Web Applications (Hacking Exposed)》 这本书的介绍吧!