If Else Loop in Php

If Else loop in Php

Program to calculate biggest of 3 numbers

$a=5;
$b=6;
$c=7;

//$a is a variable

If (($a>$b) && ( $a >$c))
{

echo “$a is the greatest number”;

}
else
{
if (($b>$c)&&($b>$a))
{

echo “$b is the greatest number”;
}
else
{

echo “$c is the greatest number”;
}

}
?>

This is basic example of If Else loop in Php.

This entry was posted on Tuesday, August 25th, 2009 at 10:32 pm and is filed under Php-Tutorials. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Post a Comment