Answer the question
In order to leave comments, you need to log in
How to iterate over an array using Fenom?
Topic on MODX template engine Fenom (a solution related to smart is also suitable, I think the approach is the same)
Greetings!
Actually the question is the following.
There is such an array, for example, which, with the help of processing, produces this:
id: 1 - count: 2
id: 2 - count: 1
id: 2 - count: 7
{var $array_test = 'm_dish' | placeholder}
{foreach $array_test as $row}
id: {$row.id} - count: {$row.count}
{/foreach}
id: 1 - count: 2
id: 2 - count: 1
id: 2 - count: 7
id: 1 - count: 2
id: 2 - count: 8
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question