Jump to content

mktime help


djones

Recommended Posts

[quote author=obsidian link=topic=111019.msg449839#msg449839 date=1160489241]
shorten it up a bit:
[code]
<?php
$time = "09:00:00";
echo date('H:i:s', strtotime("$time +30 minutes"));
?>
[/code]
[/quote]

Ahh, nice. I was looking in the manual, but I couldn't see if it was possible to give a time and a +30 minutes thing...
Link to comment
https://forums.phpfreaks.com/topic/23491-mktime-help/#findComment-106832
Share on other sites

[quote author=Daniel0 link=topic=111019.msg449844#msg449844 date=1160489597]
Ahh, nice. I was looking in the manual, but I couldn't see if it was possible to give a time and a +30 minutes thing...
[/quote]

yes, i believe you can also do it like this:
[code]
<?php
echo date('H:i:s', strtotime($time, "+30 minutes"));
?>
[/code]
Link to comment
https://forums.phpfreaks.com/topic/23491-mktime-help/#findComment-106835
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.