:::

7. "Endswitch". Syntactic Sugar!

You have two ways of creating a switch. 

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.


:::

語系選擇