Skip to content

Instantly share code, notes, and snippets.

@INDIAN2020
Created May 20, 2013 07:04
Show Gist options
  • Select an option

  • Save INDIAN2020/5610801 to your computer and use it in GitHub Desktop.

Select an option

Save INDIAN2020/5610801 to your computer and use it in GitHub Desktop.
php: count days
function daysCount($date)
{
$diff = (strtotime( date('Y-m-d') ) - strtotime($date)) / 86400;
return $diff;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment