faqts : Computers : Programming : Languages : PHP : kms : General

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

7 of 8 people (88%) answered Yes
Recently 2 of 2 people (100%) answered Yes

Entry

How can I loop over the values in an array?

Aug 13th, 1999 22:30
Nathan Wallace, Adam Trachtenberg


Try code like this:

    $loop = array('first', 'second', 'tenth'); 
    while (list($key,$value) = each($loop)) {
        echo $value;
    }