Easy Tutorial
❮ Php Pdo Connections Func String Setlocale ❯

PHP reset() Function

Complete PHP Array Reference Manual

Example

Outputs the value of the current and next elements in the array, then resets the internal pointer of the array to the first element:


Definition and Usage

The reset() function sets the internal pointer of an array to its first element and returns its value.

Related methods:


Syntax

Parameter Description
array Required. Specifies the array to use.

Technical Details

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

More Examples

Example 1

Demonstration of all related methods:

❮ Php Pdo Connections Func String Setlocale ❯