PHP 教程
返回包含數(shù)組中所有鍵名的一個新數(shù)組:
array_keys() 函數(shù)返回包含數(shù)組中所有鍵名的一個新數(shù)組。
參數(shù) | 描述 |
---|---|
array | 必需。規(guī)定數(shù)組。 |
value | 可選。您可以指定鍵值,然后只有該鍵值對應的鍵名會被返回。 |
strict | 可選。與 value 參數(shù)一起使用??赡艿闹担?ul>
|
返回值: | 返回包含數(shù)組中所有鍵名的一個新數(shù)組。 |
---|---|
PHP 版本: | 4+ |
更新日志: | strict 參數(shù)是在 PHP 5.0 中新增的。 |
使用 value 參數(shù):
使用 strict 參數(shù) (false):
使用 strict 參數(shù) (true):