News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

PHPMaster.com:
Learning Loops
December 15, 2011 @ 10:15:00

PHPmaster.com has a new introductory tutorial for those just starting out with PHP (or with programming really) talking about using looping structures for sets of data - for, while/do-while and foreach.

A significant advantage of computers is that they can perform repetitive tasks easily and efficiently. Instead of writing repetitive code you can write a set of statements that processes some data and then have the computer execute them repeatedly by using a construct known as a loop. Loops come in several different flavors in PHP: for, while, do-while, and foreach. I'll introduce you to each of them and show you how they can making repetitive tasks straightforward and easy to maintain.

The tutorial explains a use case for each of the loop types and includes a bit of sample code showing how to put it into practice. It also shares two special keywords that can be used to bypass or break out of your current loop - break and continue.

0 comments voice your opinion now!
introduction tutorial loop dataset for while foreach break continue


blog comments powered by Disqus

Similar Posts

Tobias Schlitt's Blog: A Two-day Look at PHPWeekender

DevShed: Setting Up a Web-Based File Manager: PHPfileNavigator2

Ralph Schindler's Blog: Compiling Gearman (or anything) for Zend Server CE on Snow Leopard

KillerPHP.com: Two New Video Tutorials Posted

Propser Otemuyiwa: Developing a Micro-Service with Lumen


Community Events

Don't see your event here?
Let us know!


api example series opinion introduction php7 framework performance conference part2 application laravel podcast symfony2 interview voicesoftheelephpant language community release configure

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework