next: Advance the internal array pointer of an array : Array Function « Data Structure « PHP
- PHP
- Data Structure
- Array Function
next: Advance the internal array pointer of an array
<?php
$fruits = array("apple", "orange", "banana");
print_r($fruits);
$fruit = next($fruits); // returns "orange"
echo "Next fruit: $fruit<br />";
$fruit = next($fruits); // returns "banana"
echo "Next fruit: $fruit<br />";
?>
Related examples in the same category