|
Posted by Tony on 07/02/06 16:05
"kenrbnsn" <kenrbnsn@gmail.com> wrote in message
news:1151816630.872688.71210@75g2000cwc.googlegroups.com...
> Joe wrote:
> > My knowledge is poor, but I've been reading a bit and lurking for a
> > while, and I wondered if it were possible to use PHP to display the date
> > for the second Saturday in the current month, or if that has passed, the
> > second Saturday for NEXT month.
>
> You want to look at the time(), strtotime(), and date() functions.
>
> Here is one way:
> <?php
> $today = time();
> $sec_sat = (strtotime('2nd saturday this month') >
> $today)?strtotime('2nd saturday this month'):strtotime('2nd saturday
> next month');
> echo date('l, F j, Y',$sec_sat);
> ?>
>
> Ken
Ken, can you recommend any sites with other various examples such as yours?
Thanks
Tony
Navigation:
[Reply to this message]
|