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