On Tuesday 13 January 2004 21:29, nabil wrote: > sorry but what do u think about this ? > > <?php > for ($j=1;$j<13;$j++) { > for ($i=1;$i<32;$i++) { > $mk = mktime(0, 0, 0, $j, $i, 2004); > $datex = date ("l", $mk); > $daterest = date ("j/n/Y", $mk); > if ($datex == "Tuesday") { > echo $datex.">>>>>".$daterest."<br>"; > } > } > } > ?>
You don't need the nested for-loop. Just a single loop to increment the 'day', going from, say, 1 to 366 would do. mktime() will take care of the month automatically. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general ------------------------------------------ /* I'm also pre-POURED pre-MEDITATED and pre-RAPHAELITE!! */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php