Code:
<?php $totalPics="2"; // Total photos in folder $photoOfTheDay = Array ( // Add up to 31 photos below '1' => '/ads/weichert/0615Mary.jpg' , // Name of or Path to image '2' => '/ads/weichert/0619Janet.jpg' , // Name of or Path to image ); // published at: scripts.tropicalpcsolutions.com // Place day of month in variable 'x' //$x=date("d"); // A website vistor made a suggestion to change the date function to use j // instead of d. This causes the date to be read without leading zeros. $x=date("j"); //Thanks for the suggestion Andrew // If value of date exceeds the amount of photos then pick a random photo to display if($x > $totalPics) { $x=rand(1,$totalPics); } // Display image echo <<<EOC <center><img src="$photoOfTheDay[$x]"></center> EOC; ?>