Source Code:
(back to article)
<?php $fruits = array("apple" => 1, "banana" => 2, "orange" => 3); if (array_key_exists("apple", $fruits)) { echo "Key exists!"; } else { echo "Key does not exist!"; } ?>
Result:
Report an issue