Answers for "how to search value in associative array php"

PHP
4

php search on array

//array_search
$result = array_search("apple", $fruit_array); // return index or false

//in_array
$result = in_array("apple", $fruit_array); // return true or false
Posted by: Guest on July-05-2021

Code answers related to "how to search value in associative array php"

Browse Popular Code Answers by Language