* Graham * Disaru
$num+1 must be in brackets ($num+1) or it gets treated as a string and you get '0+1' in the variable
As for the other the syntax highlighter does not like the < and treats it as an broken html tag error but it does not affect the actual operation of the code
I often start my code with #<? and end with #?> to switch off the highlighter
<!--parser:xtscript-->
#<?
var $num = 0
@loop_start
if $num <= 9
print <a href="" class="random-game"><li><img src="" class="w3-left thumbnail" width="96" height="96" alt="" /><span class="title w3-text-grey" style="word-break:break-all"></span><div style="clear:both"></div></li></a>
var $num = ($num+1)
goto @loop_start
endif
#?>
<!--/parser:xtscript-->

Copy code

also <li> is only allowed in a <ul> or <ol> tag and your code may not do what you expect
https://www.w3schools.com/html/html_lists.asp
nor should a <div> be inside an <a> tag
2018-02-14 21:37 (edited 2018-02-14 21:55 by Graham ) · (0)

Online: Guests: 1