Easy Tutorial
❮ Func Filesystem Fgetc Func Zip Read ❯

PHP end() Function

Complete PHP Array Reference Manual

Example

Output the value of the current element and the last element in the array:


Definition and Usage

The end() function moves the internal pointer to the last element of the array and outputs it.

Related methods:


Syntax

Parameter Description
array Required. Specifies the array to use.

Technical Details

Return Value: Returns the value of the last element in the array if successful, or FALSE if the array is empty.
PHP Version: 4+
--- ---

More Examples

Example 1

Demonstration of all related methods:

❮ Func Filesystem Fgetc Func Zip Read ❯