I'm a newbie (ish) and I need help in finding the dates upon which Friday, Sat and Sunday fall each week from a date until a date ....
this should be easy, can anyone help ?
should I do it by incrementing the date plus one, testing day of the week and then looping ?
Try the [man]mktime[/man] function.
eg Fridays
$d=18; $m=4; $y=2003; $thedate = date('Y-m-d', mktime(0,0,0,$m,$d,$y)); do { $d += 7; $thedate = date('Y-m-d', mktime(0,0,0,$m,$d,$y)); echo "$thedate<br>"; } while ($thedate < '2003-05-30');
hth
thanks a HEAP, it works like a charm
and now I know how that date() thing works