I'm trying to create a simple app that loops through Sundays displaying
the date until the current date is reached.  I have the loop working
nicely but I'm unsure how to compare the result to the current date.  I
put a mock loop together to get the basics working:


<? 
$dateCalc=7; 

for($i=1;$i<8;$i++){ 
$date1=mktime(0,0,0,06,30,2002); 
$date2=strtotime("+$dateCalc days",$date1); 
$date2=date("l F d Y",$date2); 

$dateCalc2=$dateCalc+6; 

$date3=strtotime("+$dateCalc2 days",$date1); 
$date3=date("l F d Y",$date3); 
echo "$date2 - $date3 <br>"; 
$dateCalc+=7; 
}


This goes through and prints out each week from Sunday to Saturday.  I
have the loop cycling a hardcoded 8 times.  I would like to have it loop
until it reaches the current week.  How can I do that?

Ron

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to