ArrayIterator
ArrayIterator::key
ArrayIterator
PHP Manual

# ArrayIterator::current

(PHP 5 >= 5.1.0)

ArrayIterator::current — Return current array entry

### Descripción

mixed ArrayIterator::current ( void )

Get the current array entry.

### Lista de parámetros

This function has no parameters.

### Valores retornados

The current array entry.

### Ejemplos

Example #1 ArrayIterator::current() example

`<?php
$array = array('1' => 'one',
'2' => 'two',
'3' => 'three');
$arrayobject = new ArrayObject($array);
for($iterator = $arrayobject->getIterator();
$iterator->valid();
$iterator->next()) {
echo $iterator->key() . ' => ' . $iterator->current() . "\n";
}
?>`

El resultado del ejemplo seria:

    1 => one
    2 => two
    3 => three

ArrayIterator
ArrayIterator::key
ArrayIterator
PHP Manual