« Back to profile of ahmedalttai

  • php

    حساب عمر الشخص حسب تاريخ الميلاد

    يبين عمر الشخص من تاريخ ميلاده

    11:44 Jul 20 2010 | Tags : عمر,تاريخ,ميلاد,
    						function age($date){
	$year_diff = '';
	$time = strtotime($date);
	if(FALSE === $time){
		return '';
	}

	$date = date('Y-m-d', $time);
	list($year,$month,$day) = explode("-",$date);
	$year_diff = date("Y") – $year;
	$month_diff = date("m") – $month;
	$day_diff = date("d") – $day;
	if ($day_diff < 0 || $month_diff < 0) $year_diff–;

	return $year_diff;
}    			         
Owned Code : jhone karry
Add comment
To add a comment, please : Login or Sign up
    ahmedalttai
    احمد ماجد ابوكلل
    • Biography مبرمج ومصمم اعمل في تصميم وبرمجة المواقع والبرامج الخاصة

    • View full profile »
  • New visitor?

    On setCode, you can save your codes, functions and classes, you can also share them with your friends, and track your favorite developer

    Join the SetCode community
  • Your language here :