FANDOM


The title of this article should be end(), but due to technical restrictions, cannot contain parenthesis.

Set the internal pointer of an array to it's last element and returns that value.

Arguments Edit

void end ({{{params}}})


Argument Inclusion Edit

(PHP 3, PHP 4, PHP 5)

Examples Edit

Example 1: Edit

<?php
 $sample = array(1,2,3,4,5);
 print end($sample);
 ?>

Output Edit

5
For more details on this function, visit its entry in the php manual.