PHP Programing language

adplus-dvertising
array_each() Function in PHP
Previous Home Next
adplus-dvertising

array_each()

The each() function returns the current element key and value, and moves the internal pointer forward.

Syntax:
each(array)

In above syntax, "array" specifies the array to use.

Example:

<?php
$vehicle = array("Car", "Scooter", "Motorcycle", "Truck");
print_r (each($vehicle));
?>

Output:

Array ( [1] => Car [value] => Car [0] => 0 [key] => 0 )

Previous Home Next