I have written / copied a sample piece of code to add a week to a date, but am baffled by the output can anyone help:
<?php
$time = time ();
// add a week to the date
$dateArray = getdate ($time);
echo "now is: " .strftime("%d %B %Y", $time). "<p>";
$month = $dateArray['month'];
$day = $dateArray['mday'];
$year = $dateArray['year'];
$later = mktime (0,0,0, $month, $day+7, $year);
echo "one week later is: " .strftime ("%d %B %Y", $later);
?>
outputs:
now is: 25 March 2003
one week later is: 01 January 2003
Thanks!