Skip to content

PowerParser Directive: :dowhile#

This is equivalent to PHP do-while loops.

Syntax#

:dowhile
<!--HTML or Other PowerParser Directive-->
:enddowhile(condition)

Example#

<ul>
    !{{ $i = 1 }}!
    :dowhile
    <li>Page {{ $i }}</li>
    !{{ $i++ }}!
    :enddowhile($i <= 0)
</ul>

This will output:

  • Page 1
Back to top