Source Code:
(back to article)
<?php $fruits = []; $last_fruit = end($fruits); if ($last_fruit !== false) { echo $last_fruit; } else { echo "Array is empty"; }
Result:
Report an issue