Source Code:
(back to article)
<?php $array = array(1, 2, "3", 4, 5); $value = 3; $result = array_search($value, $array, true); if ($result === false) { echo "Value was not found in the array"; } else { echo "Value was found at position: $result"; } ?>
Result:
Report an issue