Source Code:
(back to article)
<?php $numbers = array(1, 2, 3, 4, 5); for ($i = 0; $i < count($numbers); $i++) { if ($numbers[$i] == 3) { echo "Found 3 at index $i"; break; } } ?>
Result:
Report an issue