Is there a better way to use if..elseif..else in PHP?
What can be a better and easier way of writing this if...elseif...else code in php. Suppose $student_name and $student_age are two variables. $age1 = array(); $age2 = array(); $age3 = array(); //Similarly arrays for ages 4,5,6,7,8,9 and 10. if($student_age ==…