each

PHP 4, PHP 5, PHP 7 Deprecated: PHP 7.2.0
each - Return the current key and value pair from an array and advance the array cursor
Manual
Code Examples

Example #1 Traversing an array with each

to traverse an array, here's an example:
Result: a => apple b => banana c => cranberry
PHP Version:

Example #2 each examples

Result: Array ( [1] => bob [value] => bob [0] => 0 [key] => 0 )
PHP Version:

Example #3

Result: Array ( [1] => Bob [value] => Bob [0] => Robert [key] => Robert )
PHP Version: