>>>>> "Jack" == Jack <[EMAIL PROTECTED]> writes:
Jack> Dear all I had a form which let user to input the leave_from
Jack> and leave_to date into, the format of the date that user
Jack> input is "yyyy-mm-dd". Now i want to compare the leave_from
Jack> and leave_to date to find out the number of days between!
well, here's one way:
$interval_days= (strtotime($to_date) - strtotime($from_date)) / 3600 * 24
adjust to taste.
When the birdcage is open, | donate to causes I care about:
the selfish bird flies away, | http://svcs.affero.net/rm.php?r=leed_25
but the virtuous one stays. |
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php