从日期函数内的日期检索过去几小时,直到PHP中的当前时间

时间:2017-10-17 16:25:29

标签: php mysqli

如何从日期函数中的日期检索过去几小时,直到PHP中的当前时间

$select_news_query = mysqli_query($connect,"SELECT * FROM news ORDER BY id DESC");
$select_news_result = mysqli_fetch_assoc($select_news_query);
date("H:i:s",strtotime($select_news_result["date"]);

如何将日期函数中的时间值转换为过去的分钟数到当前时间并保存在变量???

0 个答案:

没有答案