This question already has an answer here:
- Add time in PHP 4 answers
Following is code that helps in adding specific hours in present time
date('H:i', strtotime('+1 hours'));
How should i add hours if the time and hours are dynamic. E.g I wish to add 2 hours to time 08:00, but these both things are saved in variables
$hours = "2";
$day_time = "08:00";
I tried the following but didn't work
$new_time = date($day_time, strtotime('+$hours hours'));
can anyone please tell how it can be done
</div>