$endIf

is used to end the whole $if block

Usage

$if[EXPRESSION]
CODE BLOCK
$endIf
1
2
3