Syntax
Syntax
A SunSed script, starts and ends with the following.
<?
// SunSed code
?>
Folowing the question mark with an equal sign will automatically PRINT the SunSed expression.
<?= $user_name ?>
File Extension
SunSed files only acceptable extension is .sunsed
SunSed Case Sensitivity
All SunSed keywords (IF
, ELSE
, WHILE
, PRINT
, RETURN
, etc.) should be in uppercase. While all function and variables names should be lowercase.
IF($user_has_agreed) {
FOREACH($agreements AS $agreement) {
PRINT $agreement['id']
}
} ELSE {
RETURN FALSE
}
Variable names could have uppercase letters, but it is not recommended. Just so you know $name
, $NAME
, and $nAmE
are all legal but treated as three different variables.
