Oct
16
2008
3

OOP: Inheritance and Modifiers

Simply class’s can be parents, and have children we have gone trough this before. This means that if a method used in Class A is needed in Class B we can tell class b to extend from class a. This will give us all the data and methods from both classes that we want.
(more…)

Written by Adam in: 4. Object Oriented Programming |
Oct
15
2008
0

OOP: Instantiation

Instantiation, is another complex word meaning creating an object. DYK: At first PHP wasn’t a OOP language!

A CLASS is a package containing two things: data and methods. Methods are just functions within a class, they obviously change name to make it more complex.The data portion consists of variables; they’re known as properties. The other part of a class is a set of functions that can alter a class’ properties; they’re called methods.

Remember that Objects can be parents, and allow their children to access parts of its contents.This is called inheritance and is one of the major advantages of classes over functions
(more…)

Written by Adam in: 4. Object Oriented Programming | Tags:
Oct
15
2008
1

ZCE Array: Standard PHP Library (SPL)

The Standard PHP Library (SPL) attempts to solve standard problems and implements efficient data access interfaces and classes.

I have little understanding of SPL! So much research gone in this section
(more…)

Written by Adam in: 3. Arrays |
Oct
14
2008
0

ZCE Array: Array Functions

Theirs lots of array functions, I hope your ready for the ones that are listed in the Zend Guide. Their are many more that I have not included. Fingers crossed they dont appear in the zend test.
(more…)

Oct
14
2008
0

ZCE Array: Multi-Dimensional Arrays

In this section of the PHP 5 Zend Certification Blog I explain Multi-Dimensional Arrays, put simply its an array inside another array. At first it is confusing but if you start using arrays you will find them useful and very effective.

Array does not have to be a simple list of keys and values; each array element can contain another array as a value, which in turn can hold other arrays as well. In such a way you can create two-dimensional or three-dimensional array.
(more…)

Written by Adam in: 3. Arrays | Tags: , ,
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
10
2008
0

ZCE Arrays: Enumerated Arrays

Their are two types of arrays Enumerated Arrays and Associative Arrays with these complex names is just referring to how its index’ed. Arrays will be covered in the PHP5 Zend Certification and high understanding is required.
(more…)

Written by Adam in: 3. Arrays | Tags: , , ,
Oct
09
2008
0

Functions: Variable Scope

If you create a variable in the global scope (in main script, outside of a function) then the value of that variable is not available within the function unless passed to it trough constants, arguments or using superglobals.

List of Superglobal’s

$_GET - receaves data sent to php via script url (?page=1)
$_POST - receaves data sent to php via posting form
$_FILES - receaves data from post file uploads
$_COOKIE - receaves data sent to PHP via HTTP cookies
$_REQUEST - receaves data sent via $_COOKIE,$_POST and $_GET
$_SESSION - receaves data avaliable from previosly stored session
$_SERVER - receaves server information
$_ENV - receaves data avaliable from the PHP environment
and the use of global or $GLOBALS['variable']
(more…)

Oct
08
2008
0

Functions: Arguments and Reference Arguments

Zend PHP 5 Certification Blog will now refresh our memory about passing arguments to functions, its a small and simple topic until we get to “Passing Arguments by Reference” where it may get confusing.

Define: Function Arguments

Information may be passed to functions via the argument list, which is a comma-delimited list of expressions.
(more…)

Written by Adam in: 2. Functions | Tags: , , ,

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