Forum und email

ArrayIterator::key

(PHP 5)

ArrayIterator::key — Retourne la clé courante du tableau

Description

mixed ArrayIterator::key ( void )

ArrayIterator::key() retourne la clé courante du tableau.

Example#1 Exemple avec ArrayIterator::key()

<?php
$array 
= array('key' => 'value');

$arrayobject = new ArrayObject($array);
$iterator $arrayobject->getIterator();

echo 
$iterator->key(); //key
?>