For
The following samples demonstrate the for loop. Counting from 1 to 10 and printing the number.
<xsl:template name="for"> <xsl:param name="i">1</xsl:param> <xsl:if test="($i <= 10)"> <xsl:value-of select="$i"/> <xsl:call-template name="while"> <xsl:with-param name="hour" select="$i+1"/> </xsl:call-template> </xsl:if> </xsl:template>
for ($i = 1; $i <= 10; $i++) { echo $i; }
PHP Manual, Control Structures
for (int i = 1; $i <= 10; $i++) { printf("%d", i); }
for (var i = 1; $i <= 10; $i++) { alert(i); }