PHP Array Element Existence Check
The in_array function
checks for the existence of a given element in an array.
Let an array be given. Let's check for the presence
of an element with the value 'b' in it:
<?php
$arr = ['a', 'b', 'c'];
$elem = in_array('b', $arr)
var_dump($elem);
?>
Code execution result:
true