PHP Adding 15 minutes to Time value

后端 未结 7 2147
一整个雨季
一整个雨季 2020-11-27 07:35

I have a form that receives a time value:

$selectedTime = $_REQUEST[\'time\'];

The time is in this format - 9:15:00 - which is 9:15am. I t

相关标签:
7条回答
  • 2020-11-27 08:01

    Quite easy

    $timestring = '09:15:00';
    echo date('h:i:s', strtotime($timestring) + (15 * 60));
    
    0 讨论(0)
提交回复
热议问题