Discussion board
What are the conditional statement ?
By prabeen patra
conditional statement....
Reply
Post   Reset
Teacher SiliconIndia replied to prabeen patra Wednesday, March 17, 2010
Hi Prabeen,
Conditional statements are used to perform different actions based on different conditions.
In PHP we have the following conditional statements:
if statement - use this statement to execute some code only if a specified condition is true
if...else statement - use this statement to execute some code if a condition is true and another code if the condition is false
if...elseif....else statement - use this statement to select one of several blocks of code to be executed
switch statement - use this statement to select one of many blocks of code to be executed.