PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
<?php
// How many days to show.... This is where my problem is...
$dayshow = "0/1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19/20/21/22/23/24/25/26/27/28/29/30/31";
// Get rid of the / etc.
$dayshow = explode("/",$dayshow);
// Show the days
for ($i=0 ; $i <count($dayshow) ; $i++)
{
$start_date = "1053568267"; // 22 May 2003
$num = $dayshow[$i];
$days = $num*24*60*60;
$day = $start_date + $days;
$day = date($datetype, $day);
$day1 = strtotime($day);
echo "<a href="$day1">$day</a><br>\n";
}
?>
Now what that will do is show 31 days since the 22 May 2003.