PHP Control Structure


 

PHP Control Structure

In this tutorial we will study about control structures, control structures are like loops (while, do-while, for,foeach),if,else,elseif. This is the index page and subsequent page will illustrate each of these.

In this tutorial we will study about control structures, control structures are like loops (while, do-while, for,foeach),if,else,elseif. This is the index page and subsequent page will illustrate each of these.

Control Structures:

Generally a PHP script is made of a series of statements which includes assignment, collection of functions, loop, conditional statements etc. In PHP except the last line we need to put a semicolon after every line, if the last line is terminated with ?> sign, it automatically assigns the semicolon after the last line. A series of statements can be clubbed together and this could be called as a statement as well. Various types of statement are discussed in the subsequent part:

 

Ads