Home  >  Article  >  Backend Development  >  php array_search() implements array value deletion_PHP tutorial

php array_search() implements array value deletion_PHP tutorial

WBOY
WBOYOriginal
2016-07-20 11:03:00912browse

The array_search() function, like in_array(), searches for a key value in an array. If the value is found, the key of the matching element is returned. If not found, returns false. ​

The array_search() function is the same as in_array(), searching for a key value in the array. If the value is found, the key of the matching element is returned. If not found, returns false.

If the third parameter strict is specified as true, the key name of the corresponding element will only be returned if the data type and value are consistent

array_search(value,array,strict)

Example

Statement:
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