PHP Statement@ Shwetank education.com

Script   If statement in php

<?php

$name = “shwetankeducation.com”;

if ( $name == “shwetankeducation.com” )
{
echo “Your name is shwetankeducation.com!”;
}
?>

Output: Your name is shwetankeducation.com!

Script   If-else statement in php
<?php
$rank = 1;

if ( $rank == 1 )
{
echo “The if statement is true”;
}

else
{
echo “The if statement false”;
}

?>

Output:The if statement is true


Script   Else-if statement in php

<?php
$shwetank_info = “sweta”;
if($shwetank_info == “Ms. Tanvi”)
{
echo “Hello Mam”;
} elseif($shwetank_info == “sweta”)
{
echo “Good Morning sweta!”;
}

else {
echo “other information”;
}
?>

Output:Good Morning sweta!