To display the current day and image for a particular day

Friday, July 23rd, 2010 Programming
<?php
 $today=date(l);
 if($today==Monday)
 {
 echo "Today is Monday" ."<br/>";
 echo "<img src='images/image1.gif'>";
 }
 elseif($today==Tuesday)
 {
 echo "Today is Tussday" ."<br/>";
 echo "<img src='images/image2.gif'>";
 }
 elseif($today==Wedsday)
 {
 echo "Today is Wedsday" ."<br/>";
 echo "<img src='images/image3.gif'>";
 }
 elseif($today==Thursday)
 {
 echo "Today is Thursday" ."<br/>";
 echo "<img src='images/image4.gif'>";
 }

elseif($today==Friday){
 echo "Today is Friday"."<br/>";
 echo "<img src='images/image5.gif'>";
 }

elseif($today==Saturday){
 echo "Today is Saturday"."<br/>";
 echo "<img src='images/image6.gif'>";
 }

elseif($today==Sunday){
 echo "Today is Sunday"."<br/>";
 echo "<img src='images/image7.gif'>";
 }
 ?>

//create the folder name as images and store the 7 images. So, it will display the todays image.

It display the output as:

Today is Friday

No comments yet.

Leave a comment