Roberts.R Posted February 7, 2011 Report Share Posted February 7, 2011 (edited) Labvakar, jeb - labrīt! Šonakt uznāca iedvesma nedaudz parakstīt... http://RobertR.pastebin.com/LLshFG6T Kā Jums izskatās šī funkcija? Man jau pa lielam viss strādā kā nākās, bet varbūt kāda optimizācija, kas varētu lieti noderēt? Edited February 7, 2011 by Roberts.R Quote Link to comment Share on other sites More sharing options...
xPtv45z Posted February 7, 2011 Report Share Posted February 7, 2011 Ja jau tev ir skaitļi, tad ar viņiem arī darbojies kā ar skaitļiem. $diff = str_replace(".","",substr($diff/60,0,2)); -> $diff=intval($diff/60); vai $diff=floor($diff/60); $hour = substr($diff/3600,0,1); -> $hour=intval($diff/3600); $min = str_replace(".","",substr(($diff - $hour * 3600)/60,0,2)); -> $min=intval(($diff%3600)/60); Quote Link to comment Share on other sites More sharing options...
indoom Posted February 7, 2011 Report Share Posted February 7, 2011 iz manuāļa "5.1.0 When called with no arguments, mktime() throws E_STRICT notice. Use the time() function instead. " Quote Link to comment Share on other sites More sharing options...
Roberts.R Posted February 8, 2011 Author Report Share Posted February 8, 2011 Paldies par ieteikumiem, ņēmu vērā :) 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.