MoonPoint Support Logo

 

Shop Amazon Warehouse Deals - Deep Discounts on Open-box and Used ProductsAmazon Warehouse Deals



Advanced Search
April
Sun Mon Tue Wed Thu Fri Sat
       
7
 
2021
Months
Apr


Wed, Apr 07, 2021 9:34 pm

Iterating over a PHP associative array by key

The PHP scripting language provides associative arrays that allow one to associate a key in the array to a value; each key in the array must be unique. E.g., I can create an array of United States presidents that uses the presidents' names as the keys and their political party affiliation as the value for each key. I could then iterate through the array by key and show the corresponding value for each key as in the example PHP code.

[/languages/php] permanent link

Valid HTML 4.01 Transitional

Privacy Policy   Contact

Blosxom logo