``` switch ($i) { } ``` ``` But we can also make it this way: ``` ``` switch ($i): endswitch; ``` ``` This is called **alternative syntax**. There's no difference when using either the **curly brace syntax** (*first example*) or **alternative syntax**(*second example*), it only provides readability, thus it's usually used when mixing HTML and PHP code in the same file.
``` switch ($i): endswitch; ``` ``` This is called **alternative syntax**. There's no difference when using either the **curly brace syntax** (*first example*) or **alternative syntax**(*second example*), it only provides readability, thus it's usually used when mixing HTML and PHP code in the same file.
校長室 教務處學務處總務處輔導室家長會媒體報導 北小臉書北小附幼臉書課程計畫平台