欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

PHP key() 函數

定義和用法

key() 函數返回數組內部指針當前指向元素的鍵名。

若失敗,則返回 FALSE。

該函數與 current() 類似,只是返回的結果不同。current() 函數返回的是元素的值,而 key() 函數返回的是元素的鍵名。

語法

key(array)
參數 描述
array 必需。規(guī)定要使用的數組。

例子

<?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