Repeating values

From: Date: Tue, 29 Feb 2000 14:47:29 +0000
Subject: Repeating values
Groups: php.template 
Request: Send a blank email to php-template+get-248@lists.php.net to get a copy of this message
Right now the spec mentions the following: * repeat = yes/no repeat the last value of the variable inside the section loop if the other variables have more values, if not specified, defaults to yes I'm wondering if it should be extended to allow either repeating of the last value the variable has, or of the default value. Example: {{ section sec1 }} {{ $foo default="green" repeat=yes }}, {{ $bar }} {{/section sec1 }} If $foo has 2 values ("red" and "blue"), and $bar has 4 values ("small", "medium", "large", "x-large"), then "blue" will be repeated: red, small blue, medium blue, large, blue, x-large If we specify repeat=default, though, it would do: red, small blue, medium green, large green, x-large Would this be a useful behavior or not? -Andrei Any sufficiently advanced Operating System is indistinguishable from Linux. - Jim Dennis

« previous php.template (#248) next »