Home » , , , » IF...ELSE Statement in PHP

IF...ELSE Statement in PHP

Written By Unknown on Senin, 14 Desember 2009 | 01.41

Use the IF...ELSE statement to execute some code if a condition is true and another code if a condition is false.


Here, the condition is true then the IF statement will be executed, if the condition is false then the ELSE statement will be executed


Syntax:
if (condition)
{
  codes to be executed if condition is true;
}
else
{
  codes to be executed if condition is false;
}


Example:
$number_three = 3;


if ( $number_three == 3 ) 
{
echo "The if statement evaluated to true";
}
else
{
echo "The if statement evaluated to false";
}

Share this article :

Posting Komentar

 
Support : Creating Website | Johny Template | Mas Template
Copyright © 2011. Kumpulan Kata Broadcast Blackberry - All Rights Reserved
Template Created by Creating Website Published by Mas Template
Proudly powered by Blogger