Home Tutorial Php Phpbasics Tutorial PHP Control Structure

 
 

PHP Control Structure
Posted on: March 25, 2010 at 12:00 AM
Advertisement
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:

 

PHP If Construct
In this tutorial we will study about if control structure.What is the use of if and how to implement are discussed in this tutorial.Examples in this tutorial will make it more clear.
 
PHP Else Construct
In this tutorial we will study about else in PHP. How to write else body part, what are the constraints to use else are discussed in this tutorial. Examples in this tutorial will make it more clear.
 
PHP ElseIf Construct
In this tutorial we will study about elseif in PHP. How to write elseif body part, what are the constraints to use etc. Aare discussed in this tutorial. Examples in this tutorial will make it more clear.
 
PHP Alternative Control Structure
In this tutorial we will study about alternative control structure in PHP. How to write alternative control structure is discussed in this tutorial. Examples in this tutorial will make it more clear.
 
PHP While Loop
In this tutorial we will study about while loop in PHP. How to write while loop is discussed in this tutorial. Examples in this tutorial will make it more clear.
 
Advertisement

Related Tags for PHP Control Structure:


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: March 25, 2010

Recommend the tutorial

Advertisements Advertisements
 

 

 

DMCA.com