View Single Post
ישן 22-12-10, 13:17   # 1
Haimz
חבר וותיק
 
מיני פרופיל
תאריך הצטרפות: Sep 2010
הודעות: 1,221

Haimz לא מחובר  

חישוב כמות הימים עד היום הולדת הבא

אוקי אני מנסה כבר כמה זמן,
והגעתי לתוצאה כזאת:
PHP קוד:
<?php
    $day 
= @htmlspecialchars($_GET['day']);
    if(
$day)
    {
        list(
$day$month$year) = explode("/"$day);
        
$mkt mktime(000$day$month$year);
        
$tim time();
        
$age date("Y") - $year;
        
$math round(time() - $mkt);
        
$final ceil((($month || $day 0) ? $math 365 $math 1) / 86400);
        
$finalResult round($final - ($age 365));
        echo 
"<strong>" $finalResult " Days.<br /> your " .$age" years old.</strong>";
    }
?>
אני יודע שזה לא נכון ..
אבל אני לא יודע מה הטעות שלי ..
תודה לעזורים, אגב אני בטוח שאני קרוב
  Reply With Quote