Simple Days Since


/ Published in: Other
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <?php
  2. function days_since ($time) {
  3. $startdate = strtotime($time);
  4. $presentdate = time();
  5. $days = round(($presentdate - $startdate)/86400);
  6. return $days;
  7. }
  8. ?>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.