Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

To find out the current year is leap year or not which
date() function we've to use.Give the syntax also

Answer Posted / vaneet badhan

to check the current year code is :

date("L");
output will be 1 coz 2008 is a leap year.

better way to check is :

$year=2008;
echo date("L",mktime(1,1,1,1,1,$year));
now you can check any year by just changing the value of
variable $year, this is called dynamic programming.

Is This Answer Correct ?    4 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which will check if a function exists?

1068


Why php is used with mysql?

1001


What would occur if a fatal error was thrown in your php program?

1038


How to genrate report in wordpress cms

2295


How to avoid the undefined index error?

978


What are the differences between php constants and variables?

1105


Is multiple inheritance supported in php?

995


What is the use of session and cookies in php?

978


What is the difference between html and php?

978


How to return ascii value of character in php?

1140


What is print_r?

882


Explain the syntax for ‘foreach’ loop with example.

946


What is php7?

1057


What is isset post?

1001


How to remove leading and trailing spaces from user input values?

954