![php php]()
IF statement is a conditional statement in PHP. We use IF statement to execute a set of codes when given condition is true.
IF statement Syntax
if (condition)
{
// Execute these code if condition is true
}
Example one:
<?php
$name = "Ravi";
if ($name == 'Ravi')
{
echo "Hello $name";
}
?>