$m = 11;
  $y = 2001;
  $ts = mktime(0, 0, 0, $m, 1, $y);
  $rightNowTs = time();

  while( $ts < $rightNowTs )  {
    print( date("F j, Y", $ts) . "<br>");
    $m += 1;
    $ts = mktime(0, 0, 0, $m, 1, $y);
  }

will print out:

November 1, 2001
December 1, 2001
January 1, 2002

On Wed, 16 Jan 2002, [iso-8859-1] Daniel AlsÚn wrote:

> Hi,
>
> i need a quick tip.
>
> I need a page containing links to get information from a database from
> different timeperiods. I want the links to start from a given month, ie
> November 2001, and stretch to the present month.
> However - i don┤t want to manually add a new link every month.
>
> How do i approach this? I obviously need some sort of function that can
> check todays date and count how many months it needs to print from the given
> startdate.
>
> Thanks
> # Daniel AlsÚn    | www.mindbash.com #
> # [EMAIL PROTECTED]  | +46 704 86 14 92 #
> # ICQ: 63006462   | +46 8 694 82 22  #
> # PGP: http://www.mindbash.com/pgp/  #
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to