I am begingin to use smarty and I have a question about it with loops.
I have two arrays:
Array
(
[0] => Array
(
[sid] => 10
[domain] => http://www.sample.com
[name] => Sample Sit
)
[1]=>Array
(
[[SNIPPED ... for posting]]
)
)
and array two
Array
(
[10] => Array
(
[0] => Array
(
[0] => 3
)
[1] => Array
(
[0] => 1
)
)
[[SNIPPED ... for posting]]
)
As you see the second array is assocated with the first, -- for SID = 10 , it holds more information that I need to ouput.
I can loop through the first array with a
{section name=link_idx loop=$array1}
{$array1[link_idx].name}
{$array1[link_idx].domain}
{/section}
without a problem .. the problem comes when i want to have an inner loop that ouputs the extra data that outputs the stuff from the 2nd array in the loop .. ie
{section name=link_idx loop=$array1}
{$array1[link_idx].name}
{$array1[link_idx].domain}
{section name=idx loop=$array2[link_idx.sid]}
{$array2[0].[idx]}
{/section}
{/section}
I hope I explained my problem... I can't get the inner loop to ouput the data accociated with the right SID of the first loop.
All help appreciated.
Thanks!!!