Skip to content

Instantly share code, notes, and snippets.

@geekcom
Created May 8, 2018 14:59
Show Gist options
  • Save geekcom/ae6329d2d43896fd5a53007a95d27c6d to your computer and use it in GitHub Desktop.
Save geekcom/ae6329d2d43896fd5a53007a95d27c6d to your computer and use it in GitHub Desktop.
<?php
$array = ['nome 1', 'nome 2', 'nome 3'];
$iter = new ArrayIterator($array);
foreach ($iter as $key => $value){
echo $key . ' - ' . $value . PHP_EOL;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment