You are here: Re: [PHP] Determining number of days in a selected month « PHP « IT news, forums, messages
Re: [PHP] Determining number of days in a selected month

Posted by clive on 01/20/06 07:48

google- I searched for "php number of days in a month" and got this link

http://www.php.net/cal_days_in_month

clive

Ben Miller wrote:
> Is there a way to easily tell PHP how many days there are in a selected
> month without writing the following out for each month:
>
> if($Month == "January") {
> $NumberOfDays = 31;
> }
> elseif($Month == "February") {
> if($Year == "A Leap Year") {
> $NumberOfDays = 29;
> }
> elseif($Year != "A Leap Year") {
> $NumberOfDays = 28;
> }
> }
> elseif($Month == "March") {
> $NumberOfDays = 31;
> }
> ............and so on, and so on, and so on
>
> I would greatly appreciate any help. Thanks.
>
>
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация