What is the correct way of embedding if else and elseif conditions inside html?
In @Patrick McMahon's response, the second comment here ( $first_condition is false and $second_condition is true ) is not entirely accurate:
/*$first_condition is true*/
First Condition is true
/*$first_condition is false and $second_condition is true*/
Second Condition is true
/*$first_condition and $second_condition are false*/
Conditions are false
Elseif fires whether $first_condition is true or false, as do additional elseif statements, if there are multiple.
I am no PHP expert, so I don't know whether that's the correct way to say IF this OR that ELSE that or if there is another/better way to code it in PHP, but this would be an important distinction to those looking for OR conditions versus ELSE conditions.
Source is w3schools.com and my own experience.