How about;
echo "It is week ".((int)(date("j")/7)+1)." of the month.<br>";

> -----Original Message-----
> From: Jon Farmer [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, 1 November 2001 20:14
> To: PHP Masters; Sheni R. Meledath
> Subject: Re: [PHP] Week of month
> 
> 
> > Is there any way to find out the week of the month. Today is in the first
> > week of month.
> >
> > That is, a function like weekofmonth() which displays 1 today & 2 next
> week.
> 
> No builtin function in PHP. You will need to search to see if some kind and
> generous soul has published their code for this purpose or write your own.
> Remember the actual first day of a week can be country specific.
> 
> Regards
> 
> Jon
> 
> 
> --
> Jon Farmer
> Systems Programmer, Entanet www.enta.net
> Tel 01952 428969 Mob 07763 620378
> PGP Key available, send blank email to [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