The answer you entered to the math problem is incorrect.

PHP Arrays: How to find an element in array using in_array

PHP in_array function is used to find if the element is present in the array as follows:

$new_array = array (1,2);

if (in_array(1, $new_array)){

print "1 is in the array";

}

This would return

"1 is in the array'.

in_array function checks if argument 1 variable is present in array in argument 2.

Reply

Please solve the math problem above and type in the result. e.g. for 1+1, type 2.