if(date("Y-m-d") >

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
I would like some help to improve this script. I'm a teacher with a schedule of 17 weeks.
Instead of using if(date("Y-m-d") >= $week3)  I would like to do a "for i = 1 to 17" and if the current date date("Y-m-d") = week[i] I would like to echo "This is week $week[i]";

Can someone show me how please?


<?php
#old code:
$week1 = "2005-01-17";
$week2 = "2005-01-24";
...
$week17 = "2005-05-09;

if(date("Y-m-d") >= $week3)
{
echo "this is week 3");
}
?>

Thanks,
John

--
John Taylor-Johnston
-----------------------------------------------------------------------------
"If it's not Open Source, it's Murphy's Law."

 '''    Collège de Sherbrooke:
 ô¿ô    http://www.collegesherbrooke.qc.ca/languesmodernes/
  -     819-569-2064

  °v°   Bibliography of Comparative Studies in Canadian, Québec and Foreign Literatures
 /(_)\  Université de Sherbrooke
  ^ ^   http://compcanlit.ca/ T: 819.569.2064

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux