Re: Fw: [SMARTY] switch statement ?
| From: | Andrei Zmievski | Date: | Tue, 07 May 2002 13:45:35 +0000 |
| Subject: | Re: Fw: [SMARTY] switch statement ? | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-4068@lists.php.net to get a copy of this message | ||
On Tue, 30 Apr 2002, Roberto Bertó wrote:
> I agree to Ivo. Switch is usefull.
>
> Maybe if you are too care about Smarty performace, you should add the
> control strucure Switch like a plugin. First of all Smarty search for
> {switch. If found, load the compile plugin.
Plugins only handle one tag, basically. Switch/case has two.
> Andrei, I have a question: if I have an array $customer =
> array(3=>"A",4=>"B") and {section name=customer loop=$custid}id:
> {$custid[customer]}<br>{/section} we will not get the right output, right?
No, you need to use {foreach} in this case.
-Andrei
* 2 + 2 = 5 for extremely large values of 2. *