AppendIterator::getIteratorIndex Gets an index of iterators &reftitle.description; public intAppendIterator::getIteratorIndex Gets the index of the current inner iterator. &reftitle.parameters; &no.function.parameters; &reftitle.returnvalues; Returns an integer, which is the zero-based index of the current inner iterator. &reftitle.examples; <methodname>AppendIterator.getIteratorIndex</methodname> basic example 'aardwolf', 'b' => 'bear', 'c' => 'capybara')); $array_b = new ArrayIterator(array('apple', 'orange', 'lemon')); $iterator = new AppendIterator; $iterator->append($array_a); $iterator->append($array_b); foreach ($iterator as $key => $current) { echo $iterator->getIteratorIndex() . ' ' . $key . ' ' . $current . PHP_EOL; } ?> ]]> &example.outputs; &reftitle.seealso; AppendIterator::getInnerIterator AppendIterator::getArrayIterator