Forum : What are the conditional statement ?
Brief description  about Online courses   join in Online courses
View prabeen  patra 's Profile

What are the conditional statement ?

conditional statement....
Asked by prabeen patra | Mar 17, 2010 |  Reply now
Replies (1)
View teacher siliconindia 's Profile
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.
Mar 17, 2010