|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
kevin_traas Smarty n00b
Joined: 30 Jul 2004 Posts: 2 Location: BC, Canada
|
Posted: Fri Jul 30, 2004 8:23 pm Post subject: {section} pukes if more than 999 elements |
|
|
Running Smarty 2.6.3 on PHP 4.3.8 (Debian Sid).
If the array I pass to section (loop=$myarray) contains 1000 or more elements (count($myarray) >= 1000), only the first array element for every 1000 elements in the array will be displayed.
For instance, if I have 1000-1999 elements in the array, Smarty will display only element #1. If I have 2000-2999 elements in the array, Smarty will only display elements #1 and #2. (I'm not sure about "and so on..." as I've only tested this far.)
As expected, if I have 1-999 elements in the array, Smarty will display them all correctly as expected.
Oh, and yes, I have my (good) reasons for displaying that many elements on one page... _________________ Regards,
Kevin Traas |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Fri Jul 30, 2004 9:08 pm Post subject: |
|
|
you must be doing something seriously wrong.
[section loop=100000 name=j}{$smarty.section.j.index}
{/section}
dumps all numbers requested for me. |
|
Back to top |
|
kevin_traas Smarty n00b
Joined: 30 Jul 2004 Posts: 2 Location: BC, Canada
|
Posted: Fri Jul 30, 2004 10:43 pm Post subject: |
|
|
Thanks for the (quick) reply!
The code I'm using is as follows:
{section name=id loop=$files}
<TR bgcolor="{cycle values="#DDDDDD, #CCCCCC"}">
<TD>{$filename[id]}</TD>
<TD align=right>{$filesize[id]}</TD>
<TD>{$filedate[id]}</TD>
</TR>
{/section}
$files is an integer, $file[name|size|date] are arrays. _________________ Regards,
Kevin Traas |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|