Tag Clouds

Pesta Blogger 2010

Ramadhan Blogging

Tantangan 31 Hari Ngeblog, Anda bisa?

Follow me on Twitter

Member of LUG STIKOMP

Short Comments


ShoutMix chat widget

Adds

Understanding Foreach in PHP

This tutorial is an easy way to understand the foreach. Yes, this is for the newbie confused with foreach. Foreach usually used in the variable loops which it has an array value. Array values are such as result from a database, or array value like this.

$ array = array ( ‘January’, ‘February’, ‘March’, ‘April’, ‘April’, ‘June’, ‘July’, ‘August’, ‘September’, ‘October’, ‘November’, ‘ December ‘);

How do these values can occupy each row in a table? Of course the easiest is to use foreach. Although could also use while. But I prefer to use foreach, because the value of the array can we count on. In addition, more cut script when using foreach. (Continue Reading….)