Source Code:
(back to article)
<?php $fruits = ['a' => 'apple', 'b' => 'banana', 'c' => 'cherry']; $last_fruit = end($fruits); // returns 'cherry' echo $last_fruit; // outputs 'cherry'
Result:
Report an issue