Showing posts with label Php program using conditional statements. Show all posts
Showing posts with label Php program using conditional statements. Show all posts

Thursday, January 2, 2014

Php program using conditional statements

If statement

<html>
<body>
<?php
$d=date("D");
if ($d=="Fri") echo "Have a nice weekend!";
?>
</body>
</html>
If else


<html>
<body>
<?php
$d=date("D");
if ($d=="Fri")
  echo "Have a nice weekend!";
else
  echo "Have a nice day!";
?>
</body>
</html>