Elseif statements


#1

I know that we have been taught about else statements in PHP at this point, but nothing has been mentioned about elseif statements? How are we supposed to know how to write one if we have never had to practise?I only know what one is because of the previous courses I have finished but if you start on PHP then you would be lost Seems a bit odd to me


#2

if (//condition) {
// code
} else if (//condition) {
// code
} else if (//condition) {
// code
} else { }

Here is an example. You just write else if() and put some condition inside. And that's it! That's how you use else if