[ feniks-sd @ 28.09.2010. 12:15 ] @
Imam funkciju koja određenom datumu dodaje određeni broja dana. Nikako ne uspijevam pravilno dostaviti vrijednosti funkciji, a uvjeren sam da je skripta u redu. Može li netko pomoći. Code: $totalDay = '60' ; $timestamp=addDayToDate(time(),$totalDay) ; function addDayToDate($timeStamp, $totalDays=1){ // You can add as many days as you want. mktime will accumulate to the next month / year. $thePHPDate = getdate($timeStamp); $thePHPDate['mday'] = $thePHPDate['mday']+$totalDays; $timeStamp = mktime($thePHPDate['hours'], $thePHPDate['minutes'], $thePHPDate['seconds'], $thePHPDate['mon'], $thePH$ return $timeStamp; } |