(fwd) Re: [PHP Template] Repeating values
[email protected] (Andrei Zmievski) Tue, 29 Feb 2000 11:08:45 -0600
| Newsgroups | php.template |
|---|---|
| Message-ID | <[email protected]> |
----- Forwarded message from Andrei Zmievski <[email protected]> ----- From: Andrei Zmievski <[email protected]> To: Helmut Kleinhans <[email protected]> Date: Tue, 29 Feb 2000 11:08:14 -0600 Subject: Re: [PHP Template] Repeating values On Tue, 29 Feb 2000, Helmut Kleinhans wrote: > Is it posible to do something like this: > > {{ section sec1 }} > {{ $foo default="green" repeat=2 }}, {{ $bar }} > {{/section sec1 }} > > If $foo has 3 values (red,blue,green), and $bar has 4 values ("small", > > "medium", "large", "x-large"), then "blue" will be repeated: So, repeat=2 would specify that it repeats the 'green' value, sort of like array indexing? I don't know if it'd be very useful. Most of the time you shouldn't care what order the items appear in the template and you wouldn't really know if 'green' was last or not. > or things like this > > {{ section sec1 }} > {{ $foo default="green" repeat=$var }}, {{ $bar }} > {{/section sec1 }} Repeat based on the value of another variable? -Andrei * The future has arrived, it's just not evenly distributed. -W. Gibson * ----- End forwarded message ----- -Andrei "In My Egotistical Opinion, most people's C programs should be indented six feet downward and covered with dirt." -- Blair P. Houghton