php find first and last item of array

php
voted: 1
vote
php array find

Finding first and last item of an array using end and reset functions

<?php 

$colors = array('green', 'yellow', 'grey');

echo end($colors);

echo reset($colors);

?>
working url: not entered
version: not entered
Leave a Comment:
Characters left:
No comments yet.