New: Learn Statamic on Laracasts!

We've retired the forum in favor of GitHub Discussions.

New conversations can be started on GitHub. Existing conversations will remain for a while longer.

Head over to GitHub →

How to set variable and change its value in template

App November 22, 2018 by App

I am using for each loop in my template file. But I need some values from the last iteration.

So I want to store all these values into variables at the end of the current iteration and will use it in the next iteration.

So how can we do this in the Statamic template file?

Answered by Erin Dalzell!
>>>>>>> Answered <<<<<<<
1 Reply