Back To Forum Post
Main Index
Predefined Functions
if elseif
more switches
Example code
<!--parser:xtscript--> # 1 random number var $x = call mt_rand $min=1;$max=100 # The basic "if elseif" if $x > 90 print \$x is more than 90 <hr /> elseif $x > 80 print \$x is more than 80<hr /> elseif $x > 70 print \$x is more than 70<hr /> elseif $x > 60 print \$x is more than 60<hr /> elseif $x > 50 print \$x is more than 50<hr /> elseif $x > 40 print \$x is more than 40<hr /> elseif $x > 30 print \$x is more than 30<hr /> else print \$x is less than 30<hr /> endif print \$x=$x<br /> <!--/parser:xtscript-->
Show as text
Example output
Reload
$x is more than 90
$x=100
Related pages
if
if and
if or
if not or
if not or not
goto
Quick index
assign
comments
concatenation
cookies
debugging tools
del
delete
get
goto
if
if and
if elseif
if not or
if not or not
if or
includes
js in xtscript
print
return
source
user defined functions
var
xt files
xtfunctions in xtscript
xtscripts