Stupid array question : precision
| From: | Luc Saint-Elie | Date: | Sat, 18 Aug 2001 15:45:21 +0000 |
| Subject: | Stupid array question : precision | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-1357@lists.php.net to get a copy of this message | ||
Hello,
Some précisions on my stupid previous question :
Step 1 the array
==============
It is of the form
Array
(
[1] => Array
(
[paragraph_id] => 1
[paragraph_title] => foo tile 1
[paragraph_chapo] => foo chapo 1
[paragraph_text] => foo text 1
)
[2] => Array
(
[paragraph_id] => 2
[paragraph_title] => foo title 2
[paragraph_chapo] => foo chapo 2
[paragraph_text] => foo text 2
)
and son on
)
___________________________________________
If i do
$tpl->assign('article_corps', $article_corps);
then
{section name=data loop=$article_corps}
{$article_corps[data.index].paragraph_id} {$article_corps[data.index].paragraph_title}
{$article_corps[data.index].paragraph_chapo}
{$article_corps[data.index].paragraph_text}
{/section}
Only $article_corps[1] is displayed, there is only one loop
Where do I screw things up ???
Luc