PHP Programing language

array_each() Function in PHP
Previous Home Next

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

Tolal:0 Click:

Show All Comments

Did not find what you were looking for leave your name and message. We will revert within 24 hours
Name:
eMail:
Comment / Feedback: