date and time problem
Posted: Wed Jul 02, 2003 9:45 pm
Hello everybody..
trying to add a number of days to the day1 variable to show the expired date but it's not working..
the example i followed:
http://www.phpbuilder.com/columns/akent ... hp3?page=5
but it's doesn't seem to work.. can someone look at this code and let me know what i'm doing wrong.
Thanks
trying to add a number of days to the day1 variable to show the expired date but it's not working..
the example i followed:
http://www.phpbuilder.com/columns/akent ... hp3?page=5
but it's doesn't seem to work.. can someone look at this code and let me know what i'm doing wrong.
Code: Select all
<?
$timestamp = time();
echo "current time stamp -->: ".$timestamp;
echo "<p>";
$date_time_array = getdate($timestamp);
$day1 = $date_time_array["mday"];
$month1 = $date_time_array["month"];
$year1 = $date_time_array["year"];
echo "example 1 --> ".$month1." ".$day1." ".$year1."<p>"; //works
$date1 = mktime(0, 0, 0, $month1, $day1+15, $year1);
echo "<p>";
echo "exp date ". strftime("%A %d %b", $date1);
?>