Re: [PHP Template] Repeating values
| From: | Andrei Zmievski | Date: | Wed, 01 Mar 2000 04:19:08 +0000 |
| Subject: | Re: [PHP Template] Repeating values | ||
| References: | 1 | Groups: | php.template |
| Request: | Send a blank email to php-template+get-265@lists.php.net to get a copy of this message | ||
At 04:09 PM 2/29/00 -0800, J. M. Castagnetto wrote:
>> red, small
>> blue, medium
>> blue, large,
>> blue, x-large
>
>This may be confusing, because if the user expects that missing values will
>be covered by the "default=" attribute, then this behaviour will be
>counterintuitive.
Yes, I agree.
>Just for pure speculation, one can also set up things so instead of a simple
>one to one correspondence between the lists, there is a combinatirial
>relation:
>
>red small
>red medium
>red large
>red x-large
>blue small
>blue medium
>blue large
>blue x-large
>
>Now that may be interesting.
Hmm, I don't know how useful that'd be and the syntax would probably suck. :)
The problem is, if a variable has a single value you'd usually want to just
repeat it for each section iteration. If a variable is an array, then you'd
probably want to pad it with default value. Different behaviors.
-Andrei