creating a loop for time incremented by 15 minutes

后端 未结 8 2032
猫巷女王i
猫巷女王i 2020-12-29 13:23

i\'m trying to make a loop that will output this:

08:00
08:15
08:30
08:45
09:00
09:15
09:30
09:45

i need it to go from 08:00 to 17:00

8条回答
  •  北海茫月
    2020-12-29 13:28

    DateInterval can be used to create a new dateinterval object for our date calculation and uses in any script. In the advance PHP object oriented style for all date & time calculations this format is useful.

    Check below links:
    http://php.net/manual/en/class.dateinterval.php
    http://www.plus2net.com/php_tutorial/date-interval.php

提交回复
热议问题