Oct
10
2008
0

ZCE Arrays: Array Iteration

Output Arrays

You can use the simple way, if you know what the index of the value you want to output such as:

echo $Beatles[2]; //outputs George

OR, we can use a loop to output every beetle:

foreach ($Beatles as $Beatle){
 echo "$Beatle";
}

(more…)

Written by Adam in: 03. Arrays | Tags: , , , , ,

WordPress Powered, Theme by TheBuckmaker.com | Add to Technorati Favorites. | RSS and Comments RSS