# Countdown

**URL:** <https://forum.kirupa.com/t/countdown/250379>\
**Category:** Uncategorized\
**Created:** [January 29, 2008, 3:15am UTC](https://forum.kirupa.com/t/countdown/250379 "2008-01-29T03:15:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dreamerp](https://avatars.discourse-cdn.com/v4/letter/d/fbc32d/32.png) [@dreamerp](https://forum.kirupa.com/u/dreamerp)\
**Post date:** [January 29, 2008, 3:15am UTC](https://forum.kirupa.com/t/countdown/250379/1 "2008-01-29T03:15:12Z")

</div>

Hello,

I am using PHP to make a countdown. Basically, I just want to get the amount of days, but I guess minutes and seconds would be nice too.

I was experimenting with date() however whenever I tried to find the last day of the month, then any other day I used date(‘t’) it would also bring the last day of the month. I was thinking I could take the last day of the month and subtract the current day. So, today is the 28th and the last day of the month is 31. So, I could have it subject 28 from 31.

Like I said, hours and seconds would be great too, but I am confused on what to do. I used a few functions like mktime() and strftime() but not sure what to do.

Any help is appreciated.

THanks
