[nycphp-talk] Smarty syntax: for(...)
Scott Mattocks
crisscott at netzero.com
Wed Oct 22 17:23:21 EDT 2003
Cycle loops is used to alternate or cycle through an array of values.
It isn't a looping structure. It will just return the next element in
the array when called and then go back to the begining. I need a loop
that doesn't require an array for control. Even a while() structure
would work but I can't seem to find that either.
Scott Mattocks
jon baer wrote:
> did u try to cycle?
>
> http://smarty.php.net/manual/en/language.function.cycle.php
>
> - jon
>
> ----- Original Message -----
> From: "Scott Mattocks" <crisscott at netzero.com>
> To: "NYPHP Talk" <talk at lists.nyphp.org>
> Sent: Wednesday, October 22, 2003 4:33 PM
> Subject: [nycphp-talk] Smarty syntax: for(...)
>
>
>
>>Hello,
>>
>>I am working with Smarty templates but I am having trouble trying to do
>>what I want with them. I want to print a block of code a specific
>>number of times sort of like I would do with a for() loop in PHP. I am
>>not using values from an array so I can't use section or foreach loops.
>> I can't find in the documentation how to turn something like this into
>>Smarty code:
>>
>>for($i = 0; $i < max_iters; ++$i) {
>> echo $i . "<br />";
>>}
>>
>>Does anyone have any suggestions?
>>
>>Thanks
>>Scott Mattocks
>>
>>_______________________________________________
>>talk mailing list
>>talk at lists.nyphp.org
>>http://lists.nyphp.org/mailman/listinfo/talk
>>
>
>
> _______________________________________________
> talk mailing list
> talk at lists.nyphp.org
> http://lists.nyphp.org/mailman/listinfo/talk
>
>
More information about the talk
mailing list