I am trying to add hh:mm:ss with the date. How can i do it?
I tried with the following but it works when the hour is string, but when adding time is similar to MySQL
print date('Y-m-d H:i:s',strtotime($timeA." +03 hour +05 minutes +01 seconds"));
Should work also.
So:
$timeA= '2015-10-09 13:40:14'; $timeB = vsprintf(" +%d hours +%d minutes +%d seconds", explode(':', '03:05:01')); print date('Y-m-d H:i:s',strtotime($timeA.$timeB));
Can be the solution.