calculate no. of days dynamically

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Deepika Gupta
    New Member
    • Jan 2012
    • 1

    calculate no. of days dynamically

    suppose there is two text box first one is from date and second one is to date.when we input the value in given text boxes then dynamically calculate the difference date i mean calculate total no. of days automatically in .php page.Please reply me asap....
    thanks in advance...
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    you might find the strtotime() function useful.

    if you have PHP 5.3+ you can use the DateTime classes (esp. DateTime::diff( ))

    Comment

    Working...