Answers for "find in array php by value"

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 "find in array php by value"

Browse Popular Code Answers by Language