Smarty array usage
I have this array :
Array
(
[Apple] => Array
(
[0] => Array
(
[id_device] => 1
[device_name] => iPhone 5
[device_brand] => Apple
)
[1] => Array
(
[id_device] => 2
[device_name] => iPhone 4/4S
[device_brand] => Apple
)
)
[Samsung] => Array
(
[0] => Array
(
[id_device] => 3
[device_name] => Galaxy S4
[device_brand] => Samsung
)
[1] => Array
(
[id_device] => 4
[device_name] => Galaxy S3
[device_brand] => Samsung
)
)
)
I'd like to generate with smarty a simple thing :
<div class="Apple">
<p rel="1">iPhone 5</p>
<p rel="2">iPhone 4/4S</p>
</div>
<div class="Samsung">
<p rel="3">Galaxy S4</p>
<p rel="4">Galaxy S3</p>
</div>
But I just can't make it, I'm quite mad tonight, two very simple problems
and an afternoon wasted ^^ (moreover I'm not really confident with arrays
yet). Could you just help me ?
Pleaaaase ^^
Thanks for reading anyway !
No comments:
Post a Comment