如何从我使用 twig 模板引擎的两个不同数组中获得组合结果
大批:-
Array
(
[0] => Array
(
[id] => 1
[title] => This is title
[labels] => Array
(
[0] => This is label-1
[1] => This is lable-2
)
[price] => Array
(
[0] => 50
[1] => 90
)
[desc] => great item
[tags] => item,great
[time] => 1352129710
)
)
我想要的是
- 这是标题
- 这是标签 1 50
- 这是标签 2 90
我试过的
<ul>
{% for item in market %}
<li>{{ item.title }}</li>
<ul>
{% for key in item.labels %}
<li>{{ key }} - **HOW TO DISPLAY PRICE HERE FROM [price]=>Array(..) **</li>
{% endfor %}
</ul>
{% endfor %}
</ul>