Hi everyone Im a newbiew at smarty, and I would like to ask some suggestion about something here it is
I have an array like this
Array
(
[1] => Array
(
[0] => Array
(
[catID] => 1
[0] => 1
[title] => 潮目の変化、米国貯蓄率の急低下
[1] => 潮目の変化、米国貯蓄率の急低下
[comName] => 【アイフィス・インベストメント・マネジメント株式会社】
[2] => 【アイフィス・インベストメント・マネジメント株式会社】
)
[1] => Array
(
[catID] => 1
[0] => 1
[title] => category 1 v2
[1] => category 1 v2
[comName] => 【アイフィス・インベストメント・マネジメント株式会社】
[2] => 【アイフィス・インベストメント・マネジメント株式会社】
)
[2] => Array
(
[catID] => 1
[0] => 1
[title] => fas
[1] => fas
[comName] => 【アイフィス・インベストメント・マネジメント株式会社】
[2] => 【アイフィス・インベストメント・マネジメント株式会社】
)
)
)
What i wanted is to output this array in a template like this
Category: 【アイフィス・インベストメント・マネジメント株式会社】--> this is equal to [comName]
Title: 潮目の変化、米国貯蓄率の急低下
Title: category 1 v2
Title: fas
But I only manage to out put the key of the array..
Here is the code I used,I've seen it somewhere in the internet.
{foreach from=$news key=key item=item}
<P>Category: {$key}
{foreach from=$item key=index item=news}
<P>Title: {$news.title}
</P>
{/foreach}
</P>
{/foreach}
Please help me..
Thanks a lot