How to check leap year in php?
$year = 2014;
// Leap years are divisible by 400 or by 4 but not 100
if(($year % 400 == 0) || (($year % 100 == 0) && ($year % 4 == 0))){
echo "$year is a leap year.";
} else{
echo "$year is normal year.";
}
How to check leap year in php?
$year = 2014;
// Leap years are divisible by 400 or by 4 but not 100
if(($year % 400 == 0) || (($year % 100 == 0) && ($year % 4 == 0))){
echo "$year is a leap year.";
} else{
echo "$year is normal year.";
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us