简体   繁体   中英

How do I get the unix timestamp of 6pm/7pm/8pm of the present day in php?

您如何在PHP中获得今天上午6点至晚上9点之间每小时(在小时[即6:00、7:00、8:00])的UNIX时间戳?

for ($i=6; $i<=21; $i++)
    echo strtotime("$i:00") . '\n';

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM