In if statement use OR to connect two conditions : If statement « Statement « PHP
- PHP
- Statement
- If statement
In if statement use OR to connect two conditions
<?
$degrees = "95";
$hot = "yes";
if (($degrees > 100) || ($hot == "yes")) {
echo "<P>TESTIt's <strong>really</strong> hot!</P>";
} else {
echo "<P>TESTIt's bearable.</P>";
}
?>
Related examples in the same category