php days ago date


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



Copy this code and paste it in your HTML
  1. function daysAgo( $days )
  2. {
  3. return date( 'YmdHis', mktime( date( 'H' ),
  4. date( 'i' ),
  5. date( 's' ),
  6. date( 'm' ),
  7. date( 'd' ) - $days,
  8. date( 'Y' ) ) );
  9. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.