How to get the number of hours untill midnight with PHP
问题 Scenario: An record was entered into the database. I am trying to figure out the following equations: How to get the number of hours since the record was added. How to get how many hours are left until midnight since the record was added. Given these times: Date / Time: 2012-08-22 20:11:20 Time Stamp: 1345684280 Midnight Tonight: 2012-08-23 00:00:00 Midnight Time Stamp: 1345698000 I feel like I'm on the right track. Just need some proper math to do the calculations? I am horrible at math. Any