Answers for "how to check the array contains in php"

PHP
18

php in array

$colors = array("red", "blue", "green"); 
 
if (in_array("red", $colors)) { 
	echo "found red in array"; 
}
Posted by: Guest on July-01-2019

Code answers related to "how to check the array contains in php"

Browse Popular Code Answers by Language