An if Statement That Uses else : If : Language Basics PHP Source Code


PHP Source Code » Language Basics » If »

 

An if Statement That Uses else




<html>
<head>
<title>An if Statement That Uses else</title>
</head>
<body>
<?php
$mood = "sad";
if $mood == "happy" ){
    print "I'm in a good mood";
}else{
    print "Not happy but $mood";
}
?>
</body>
 </html>

           
       



HTML code for linking to this page:

Follow Navioo On Twitter

PHP Source Code

 Navioo Language Basics
» If