PHP end() function

PHP end() function

The end() function in PHP sets the internal pointer of an array to its last element. This function returns the value of the last element

Syntax

Parameter

array (required)– This parameter represents the input array.

Return

This function returns the value of the last element or FALSE for an empty array.

Example 1

Output

Example 2

Output

Example 3

Output