(fwd) Re: [PHP Template] Repeating values
| From: | Andrei Zmievski | Date: | Tue, 29 Feb 2000 17:08:45 +0000 |
| Subject: | (fwd) Re: [PHP Template] Repeating values | ||
| Groups: | php.template | ||
| Request: | Send a blank email to php-template+get-251@lists.php.net to get a copy of this message | ||
----- Forwarded message from Andrei Zmievski <andrei@ispi.net> -----
From: Andrei Zmievski <andrei@ispi.net>
To: Helmut Kleinhans <helli@digiconcept.net>
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