![]() |
![]() ![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 31 Pomógł: 3 Dołączył: 14.04.2009 Skąd: Wziąć piwo? Ostrzeżenie: (0%) ![]() ![]() |
Witam!
Napisałem oto taką funkcję: CODE function counttime() { global $time; $arrHour = explode(":", $time); $arrTime2 = array(8, 10, 12, 14, 16, 18, 20, 22, 24); foreach ($arrTime2 as $intTime) { if ($arrHour[0] < $intTime) { $intWait = (($intTime - $arrHour[0]) * 60) - $arrHour[1]; $intHours = floor($intWait / 60); $intMinutes = $intWait % 60; break; } } $arrTime = array('', ''); if ($intHours < 1) { $arrTime[0] = ''; } if ($intHours == 1) { $arrTime[0] = $intHours.echo 'godzina'; } if ($intHours > 1 && $intHours < 5) { $arrTime[0] = $intHours.echo 'godziny'; } if ($intHours > 4) { $arrTime[0] = $intHours.echo 'godzin'; } if ($intMinutes < 1) { $arrTime[1] = ''; } if ($intMinutes == 1) { $arrTime[1] = $intMinutes.echo 'minuta'; } if (($intMinutes > 1 && $intMinutes < 5) || ereg("^[2-5][2-4]*$", $intMinutes)) { $arrTime[1] = $intMinutes.echo 'minuty'; } if (($intMinutes > 4 && $intMinutes < 20) || ereg("^[2-5][5-9]*$", $intMinutes) || ereg("^[2-5][0-1]*$", $intMinutes)) { $arrTime[1] = $intMinutes.echo 'minut'; } return $arrTime; } i ten skrypt nie dość, że nie chce działać, to przerywa działanie innych skryptów po załadowaniu tego... Proszę o pomoc Bobek |
|
|
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 89 Pomógł: 20 Dołączył: 13.05.2007 Skąd: Warszawa Ostrzeżenie: (0%) ![]() ![]() |
Takie zapisy są niepoprawne
![]()
Chodziło Ci chyba o:
-------------------- Kurs Video PHP i MySQL, porady-it.pl - gotowe rozwiązania dla webmasterów
|
|
|
![]()
Post
#3
|
|
Grupa: Zarejestrowani Postów: 31 Pomógł: 3 Dołączył: 14.04.2009 Skąd: Wziąć piwo? Ostrzeżenie: (0%) ![]() ![]() |
Dzięki wielkie działa
![]() Aż wstyd się przyznać do takiego błędu... ![]() |
|
|
![]() ![]() |
![]() |
Wersja Lo-Fi | Aktualny czas: 31.07.2025 - 07:50 |