MySQL Forums
Forum List  »  PHP

Re: Data Validation
Posted by: Peter Brawley
Date: May 02, 2006 12:38PM

Given a $year selection, numbers of month days are:

$days = array(31,(($year%4)?28:(($year%100)?29:28)),31,30,31,30,31,31,30,31,30,31);

When the user selects Jan, the number of days is $days[0], for Feb it's $days[1], &c.

PB

Options: ReplyQuote


Subject
Written By
Posted
May 02, 2006 03:52AM
May 02, 2006 05:20AM
May 02, 2006 05:53AM
May 02, 2006 06:22AM
May 02, 2006 07:02AM
May 02, 2006 07:08AM
May 02, 2006 09:33AM
May 02, 2006 10:38AM
Re: Data Validation
May 02, 2006 12:38PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.