Answers for "how to find something in 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 find something in array php"

Browse Popular Code Answers by Language