Re: [SMARTY] Arrays giving out to little information
| From: | Eskil Kvalnes | Date: | Mon, 16 Sep 2002 20:28:39 +0000 |
| Subject: | Re: [SMARTY] Arrays giving out to little information | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-5981@lists.php.net to get a copy of this message | ||
Thanks, it worked :)
---------------
Sincerely,
Eskil Kvalnes
eskil@uten.net
----- Original Message -----
From: "Gary Loescher" <gary@loescher.org>
To: <smarty-general@lists.php.net>
Sent: Monday, September 16, 2002 9:56 PM
Subject: RE: [SMARTY] Arrays giving out to little information
Whoops, forgot to hit reply all...
>-----Original Message-----
>From: Gary Loescher [mailto:gary@loescher.org]
>Sent: Monday, September 16, 2002 2:55 PM
>To: 'Eskil Kvalnes'
>Subject: RE: [SMARTY] Arrays giving out to little information
>
>
>Try just {$commentsData[news]}, assuming it contains only the
>counts as you've shown.
>
>Gary
>
>>-----Original Message-----
>>From: Eskil Kvalnes [mailto:eskil@uten.net]
>>Sent: Monday, September 16, 2002 2:13 PM
>>To: Smarty Mailing List
>>Subject: [SMARTY] Arrays giving out to little information
>>
>>
>>Hey,
>>
>>I have two arrays, one containing the news information and one
>>containing the number of comments for each news-post. I use
>>{section} to loop trough these arrays. But when the comment
>>count gets above 9 comments (Two digits) it only prints out
>>the first digit.
>>
>>Like, if there's 14 comments, it prints out 1.
>>
>>I've checked the commentsData-array and it says Array ( [0] =>
>>14 [1] => 1 [2] => 4 [3] => 2 [4] => 6 ) Wich prints out:
>>1<br>1<br>4<br>2<br>6<br>
>>
>>{section name=news
>>loop=$newsData}{$commentsData[news].commentsCount}{/section}
>>
>>This is what I use to print out the number in the .tpl.htm files.
>>
>>---------------
>>Sincerely,
>>Eskil Kvalnes
>>eskil@uten.net
>>
>>
>>
>>--
>>Smarty General Mailing List (http://smarty.php.net/)
>>To unsubscribe, visit: http://www.php.net/unsub.php
>>
>
--
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php