the tricky part is I could have fifteen rows in the db all with different start and end dates that I need to check each day against.
-----Original Message----- From: Michal Migurski [mailto:[EMAIL PROTECTED] Sent: Monday, May 24, 2004 10:18 AM To: Torsten Roehr Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Re: best way to do this with arrays... > $start = '2004-07-04'; > $end = '2004-07-09'; > $check = '2004-07-06'; // the date you want to check > > $timestampStart = > mktime(0,0,0,substr($start,5,2),substr($start,8,2),substr($start,0,4)); > $timestampEnd = > mktime(0,0,0,substr($end,5,2),substr($end,8,2),substr($end,0,4)); > $timestampCheck = > mktime(0,0,0,substr($check,5,2),substr($check,8,2),substr($check,0,4)); FYI, the above can be shortened to: $timestampStart = strtotime($start); $timestampEnd = strtotime($end); $timestampCheck = strtotime($check); --------------------------------------------------------------------- michal migurski- contact info and pgp key: sf/ca http://mike.teczno.com/contact.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php