Forum und email

end

(PHP 4, PHP 5)

end — Sposta il puntatore interno dell'array all'ultimo elemento

Descrizione

mixed end ( array $array )

end() fa avanzare il puntatore di array all'ultimo elemento, e restituisce il suo valore.

Example#1 Un semplice esempio di end()

<?php

$frutti 
= array('mela''banana''mirtillo');
echo 
end($frutti); // mirtillo
      
?>

Vedere anche current(), each(), prev(), next() e reset().