I want to be able to access the integer 17 in an array $cart containing this
array(1) { [17]=> int(1) }
This is my code
{% for c in cart %}
{{c}}
{% endfor %}
but I keep getting the value 1 instead of the integer 17.
What am I doing wrong?
Twig framework display issues
Page 1 of 13 Replies - 177 Views - Last Post: 06 August 2012 - 07:31 AM
Replies To: Twig framework display issues
#2
Re: Twig framework display issues
Posted 06 August 2012 - 07:20 AM
you’re accessing the value not the key. check the twig documentation for looping over keys and values: http://twig.sensiola...c/tags/for.html
#3
Re: Twig framework display issues
Posted 06 August 2012 - 07:28 AM
Thanks a lot Dormilich, you are a life saver
#4
Re: Twig framework display issues
Posted 06 August 2012 - 07:31 AM
I just happen to know where to look first. *gg*
Page 1 of 1
|
|

New Topic/Question
Reply


MultiQuote




|