Source Code:
(back to article)
<?php $colors = ['red', 'green', 'blue', 'yellow']; // reset the pointer reset($colors); // get the first element echo current($colors); // outputs 'red'
Result:
Report an issue