Better still, use the date("t"); to find out how many days are in the given
month. This part of the date function is a blessing, given the varying days
in months, and the fact that we've a leap year every four years.
James
"Daniel Rezny" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello Yamin,
>
> Monday, July 23, 2001, 9:27:46 AM, you wrote:
>
> YP> hi,
> YP> how do i check that the current date is the end of month
>
> YP> Thanks in Advance
>
>
> If you want to check how long is current month and use this value
> later you can use this:
>
> $month=("m"); //can be like this depend on if you scrolling between
> moths. If yes variable $month must be recieved from link.
>
> $d=27;
> while ($d <= 32) {
> $mon = date("m",mktime(0,0,0,$month,$d,$rok));
> if ($month != $mon) {
> $daylast = $d-1; $d=33;
> }
> else {
> $d++;
> }
> }
>
> I hope it helps.
> --
> Best regards,
> Daniel mailto:[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]