|
|
| Looping [+] Favor-It | |
| |
 |
| | Sort By:
|
The function of the while loop is to do a task over and over as long as the specified conditional statement is true. This logical check is the same as the one that appears in a PHP if statement to determine if it is true or false. Author: tizag.com Code: PHP 4.0 |
We'll look at three types of loop and compare them to the Lingo equivalent. Loop structures are just like those used in languages such as C/C++, Java and JavaScript, Perl etc. This tutorial includes: While Loops, Do/While Loops and For Loops. Author: shocknet.org.uk Code: PHP 4.0 |
PHP while loops allow you to execute the same piece of code continuously while a certain condition is true. Once the condition becomes false, the program will break out of the loop and continue processing the rest of the page. Author: quackit Code: PHP 4.0 |
|  | |
PHP for loops allow you to execute the same piece of code for a specified number of times. Once the specified number has been reached, the program will break out of the loop and continue processing the rest of the page. Author: quackit Code: PHP 4.0 |
The function of the while loop is to do a task over and over as long as the specified conditional statement is true. This logical check is the same as the one that appears in a PHP if statement to determine if it is true or false. Author: Online Tutorials Code: PHP 4.0 |
The do while Loop differs from the while loop. This variation of the loop is guaranteed to execute at least once. Because the condition is at the end of the loop. I will modify the example from the while loop page. Author: PHP For Beginners Code: PHP 4.0 |
This tutorial shows you all the loop varients in PHP including do while, for, foreach and more. This is a great way to learn and even shows you live examples of each!
Author: kidslovepc Code: PHP 4.0 |
|  | |
For Loop Site: Professional and Free Web Hosting Let us take the example from the while loop lesson and see how it could be done in a for loop. The for loop allows you to define these steps in one easy line of code. It may seem to have a strange form, so pay close attention to the syntax used! Author: Online Tutorials Code: PHP 4.0 |
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. For each item in the specified array execute this code.
Author: Online Tutorials Code: PHP 4.0 |
Icon Key >
 - Recently Updated
 - Showcase Listing
|