Roberts.R Posted February 7, 2011 Report 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
xPtv45z Posted February 7, 2011 Report 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
indoom Posted February 7, 2011 Report 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
Roberts.R Posted February 8, 2011 Author Report Posted February 8, 2011 Paldies par ieteikumiem, ņēmu vērā :) Quote
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.