note 103352 added to function.strtotime

From: Date: Fri, 08 Apr 2011 20:38:10 +0000
Subject: note 103352 added to function.strtotime
Groups: php.notes 
Request: Send a blank email to php-notes+get-178646@lists.php.net to get a copy of this message
A function to add two times, without using the explode function <?php $hour_one = "01:20:20"; $hour_two = "05:50:20"; $h = strtotime($hour_one); $h2 = strtotime($hour_two); $minute = date("i", $h2); $second = date("s", $h2); $hour = date("H", $h2); echo "<br>"; $convert = strtotime("+$minute minutes", $h); $convert = strtotime("+$second seconds", $convert); $convert = strtotime("+$hour hours", $convert); $new_time = date('H:i:s', $convert); echo $new_time; ?> ---- Server IP: 69.147.83.197 Probable Submitter: 150.162.248.171 ---- Manual Page -- http://www.php.net/manual/en/function.strtotime.php Edit -- https://master.php.net/note/edit/103352 Del: integrated -- https://master.php.net/note/delete/103352/integrated Del: useless -- https://master.php.net/note/delete/103352/useless Del: bad code -- https://master.php.net/note/delete/103352/bad+code Del: spam -- https://master.php.net/note/delete/103352/spam Del: non-english -- https://master.php.net/note/delete/103352/non-english Del: in docs -- https://master.php.net/note/delete/103352/in+docs Del: other reasons-- https://master.php.net/note/delete/103352 Reject -- https://master.php.net/note/reject/103352 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#178646) next »