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: 3. Arrays | Tags: , , , , ,
Oct
10
2008
0

ZCE Arrays: Associative Arrays

Associative Arrays are the same as Enumerative arrays except in the fact that they are not idexed by numbers (but can be) instead they are indexed by a name. If you read Enumerative arrays you will not that Ringo was indexed as 3, in an Associative array he would be indexed as “drummer”. Like such

$Beatles['drummber'] = "Ringo";
echo $Beatles['drummber']; //Will output Ringo

(more…)

Written by Adam in: 3. Arrays | Tags: , ,
Oct
03
2008
1

PHP Basics: Control Structures

In this section of the Blog, their will be examples of Control Structures in PHP. This includes If and Switch statements, including the four types of loops. Not included in this section are objects and functions as they are documented in later posts. ZCE Zend Certification will cover Control Structures in detail in many sections.
(more…)

Written by Adam in: 1. PHP Basics | Tags: , , , , , , , , , , , , ,

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