Star Hoster
Photoshop Tutorials
Anonymous Web Surfing
Funny Jokes
Myspace Friends
Open Treasure Chest
Building in Paradise


December 1, 2005

PHP For Each Loop

Filed under: Intro PHP Tutorials — phpdeveloper @ 12:29 am

For Each Loop

Imagine that you have an associative array that you want to iterate through. PHP provides an easy way to use every element of an array with the Foreach statement.

In plain english this statement will do the following:

For each item in the specified array execute this code. (more…)

PHP For Loop

Filed under: Intro PHP Tutorials — phpdeveloper @ 12:26 am

For Loop

The for loop is simply a while loop with a bit more code added to it. The common tasks that are covered by a for loop are:

1. Set a counter variable to some initial value.

2. Check to see if the conditional statement is true.

3. Execute the code within the loop.

4. Increment a counter at the end of each iteration through the loop. (more…)

PHP While Loop

Filed under: Intro PHP Tutorials — phpdeveloper @ 12:11 am

While Loop

Repetitive tasks are always a burden. The nice thing about programming is that you can avoid repetitive tasks with a little bit of extra thinking. Most often these repetitive tasks are conquered in the loop.

The idea of a loop is to do something over and over again until the task has been completed. Before we show a real example of when you might need one, let’s go over the structure of the PHP while loop. (more…)

November 30, 2005

PHP Switch Statement

Filed under: Intro PHP Tutorials — phpdeveloper @ 5:43 am

PHP Switch Statement

In the previous lessons we covered the various elements that make up an If Statement in PHP. However, there are times when an if statement is not the most efficient way to check for certain conditions. (more…)

PHP Require Function

Filed under: Intro PHP Tutorials — phpdeveloper @ 5:40 am

Require Function

Just like the previous lesson, the require function is used to include a file into your PHP code. However there is one huge difference between the two functions, though it might not seem that big of a deal. (more…)

« Previous PageNext Page »