What is php array key

爱喝马黛茶的安东尼
Release: 2023-02-25 12:32:01
Original
3506 people have browsed it

What is php array key

array_keys() function returns a new array containing all the keys in the array.

Grammar

array_keys(array,value,strict)
Copy after login

Related recommendations:《php array

Example

Return a new array containing all the key names in the array:

"XC90","BMW"=>"X5","Toyota"=>"Highlander"); print_r(array_keys($a)); ?>
Copy after login

Running result:

Array ( [0] => Volvo [1] => BMW [2] => Toyota )
Copy after login

The above is the detailed content of What is php array key. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!