Hi mate,
Thanks for a very very quick reply. I will have a go and let you know. I cant really see where i am going wrong.
function generate($start_date, $end_date, $date_inc){
$last_used_date=$start_date;
// here are specific vars
$last_used_date = '2002-06-02';
$date_inc = '7 DAYS';
$date = new vlibDate();
$newdate = $date->addInterval($last_used_date, $date_inc);
echo "New date is: ".$date->formatDate($newdate, '%A %d%s %B %Y');
/*
// we need to convert our dates into a VLIB timestamp which is YYYY-MM-DD format
list ($day, $month, $year) = split ('[/.-]', $start_date);
$y = "".$year."/".$month."/".$day."";
$x_start_date = $y;
list ($day, $month, $year) = split ('[/.-]', $end_date);
$y = "".$year."/".$month."/".$day."";
$x_end_date = $y;
$x_end_date = strtotime($x_end_date);
print $start_date;
print "<BR>";
print $end_date;
print "<BR>";
print "<BR>";
$last_used_date = $x_start_date; // set our start date for first iterate
$last_used_date = strtotime($last_used_date);
$date_inc.= " DAY";
print "The new data is ".$last_used_date."<BR>";
print "The new data is ".$last_used_date."<BR>";
*/
print strrev($last_used_date);
print "<BR>";
print $end_date;
print "<BR>";
while ($last_used_date < $end_date){
$last_used_date = getnewdate($last_used_date,$date_inc);
print $last_used_date;
}
//$x = getnewdate($last_used_date,$date_inc);
}
function getnewdate($last_used_date,$date_inc){
$date = new vlibDate ('en');
$nextweek = $date->addInterval($last_used_date, $date_inc);
}