immunity Posted June 25, 2007 Share Posted June 25, 2007 Hello i have a html that send times to php page (21:00) to make it valid time() i add string:00 right? so $string = 21:00; $string = $string.":00"; now how i make this string time ? how i add in that time 140 mins ? Quote Link to comment Share on other sites More sharing options...
per1os Posted June 25, 2007 Share Posted June 25, 2007 www.php.net/strtotime I believe thats what you want, and I do not think yo have to add the :00 to make "valid" Quote Link to comment Share on other sites More sharing options...
immunity Posted June 25, 2007 Author Share Posted June 25, 2007 hm yes i dont need but i need to remove last :00 to put it inside my drop list thx! Quote Link to comment Share on other sites More sharing options...
Caesar Posted June 25, 2007 Share Posted June 25, 2007 <?php $str = strtotime('21:00:00'); //To convert it to a timestamp that will include today's date $newstr = date("H:i", $str); //Will equal "21:00" //$newstr = date("M d, Y - H:i", $str); //Will equal "Jun 25, 2007 - 21:00" echo $newstr; ?> Quote Link to comment Share on other sites More sharing options...
immunity Posted June 25, 2007 Author Share Posted June 25, 2007 thx ! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.