> OrangeHairedBoy wrote:

> >Basically, I just want to show what the last friday of the month is, and if
> >that date has already passed, show the last friday of the next month.
>
> You can get the number of days in a month from date()
> 
> Now you know that the last Friday of the month will be at most 7 days 
> from the end of the month,
> loop through the last 7 days of the month and determine what date it is 
> using  the date() function.
> Compare the date to determine if it is Friday or not.
> 
> And then add in the check for if the date has passed or not.

The last friday of the following month will be the last friday of the current 
month + the number of day in the current month > 28 ( date("t") - 28 ).

-Bob

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

Reply via email to