You have the wrong "equal." It is necessary so:
if ($e==true){ echo "$a is max"; } elseif ($d==true){ echo "$b is max"; } else { echo "$c is max"; }
Or even so, for any variable containing true-false:
if ($e){ echo "$a is max"; } elseif ($d){ echo "$b is max"; } else { echo "$c is max"; }
Better yet, call variables meaningfully. Well, a moment of theory:
A single sign = is an assignment, a double == is a comparison without considering the type of a variable (for example, the integer 1 is a fractional number 1.0), and the triple === takes into account the type.
PS Noticed how your condition successfully optimized your code? The variable $ f in it was not useful :)
if ($e=true)instead ofif ($e == true)(or shorterif ($e)) - BOPOH=indicates the assignment, the sign==(and also===) - test for equality. - VladD