Difference between revisions of "Array (PHP)"

From Wiki @ Karl Jones dot com
Jump to: navigation, search
(Iterations)
(External links)
Line 32: Line 32:
 
* http://www.hackingwithphp.com/5/3/0/the-two-ways-of-iterating-through-arrays
 
* http://www.hackingwithphp.com/5/3/0/the-two-ways-of-iterating-through-arrays
 
* http://docstore.mik.ua/orelly/webprog/pcook/ch04_05.htm
 
* http://docstore.mik.ua/orelly/webprog/pcook/ch04_05.htm
 +
 +
[[Category:Computer programming]]
 +
[[Category:Data structures]]
 +
[[Category:PHP]]

Revision as of 13:57, 15 April 2016

This article describes arrays in PHP.

Description

...

Iterations

You can iterate through arrays in various ways.

Example using while():

<?php
    while (list($var, $val) = each($array)) {
        print "$var is $val\n";
    }
?>

See also

External links

Iteration: