PHP with HTML – if statement with colon
Note that elseif and else if will only be considered exactly the same when using curly brackets as in the above example. When using a colon to define your if/elseif conditions, you must not separate else if into two words, or PHP will fail with a parse error.
https://www.php.net/manual/en/control-structures.elseif.php
if statement with colon:
https://www.w3schools.com/php/keyword_endif.asp