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