+ 1
Is this code ok.? If any better way please suggest me.
simple php code for leap year testing https://code.sololearn.com/wBOqNXnYNTwn/?ref=app
3 Answers
+ 1
$text = ($year%4===0 && $year%100!==0) || ($year%400 === 0) ? "is leap year" : "is not";
echo $text;
+ 1
Your welcome. Thats why we're here :)
0
Thanks Max_N it is really helpful