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.