@for - Looping with a Fixed Range
The @for
directive in Ahmed PHP Template Engine allows you to loop through a specific range of numbers, similar to a traditional for
loop in PHP.
Syntax
Example
Output
Notes
The loop will execute as long as the condition remains
true
.Use
{{ $variable }}
to output the loop variable inside the HTML.
Last updated