Source Code:
(back to article)
<?php $fruits = ["apple", "banana"]; if (in_array("apple", $fruits)) { echo "Apple exists in the array"; } else { echo "Apple does not exist in the array"; }
Result:
Report an issue