We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

do while loop in volt

Hi,

How can i do 'do-while' loop in volt? and aslo wanna know about recursive loop in volt.........



33.8k

https://docs.phalcon.io/es/latest/reference/volt.html#list-of-control-structures

There isn't a Do while. But maybe you could manipulate the For index.loop var to do a workaround.



3.1k

I want script for doing recursion in volt... Thanks in advance..



33.8k

I cannot help you there (I don't have such skill in Volt), but maybe you could simulate it creating a Volt function https://docs.phalcon.io/es/latest/reference/volt.html#id1