Source Code:
(back to article)
<?php // Declare and initialize an array // $students = ['Ann', 'Jennifer', 'Mary'] $students = [ 0 => 'Ann', 1 => 'Jennifer', 2 => 'Mary', ]; if (isset($students[5])) { echo $students[5]; } else { echo "Index not present"; } ?>
Result:
Report an issue