Re: [SMARTY] Fw: possible to parse through vars?

From: Date: Mon, 18 Aug 2003 15:42:03 +0000
Subject: Re: [SMARTY] Fw: possible to parse through vars?
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-10088@lists.php.net to get a copy of this message
At 17:34 18.08.2003 +0200, you wrote:
i want to do the following: 1. get all vars starting with a certain pattern 2. extract the names of that vars 3. assign them in a special way...
Why don't you put all these vars into an array?
--> now extract all var-names from template... $smarty->new Smarty(); foreach ($names as $key){
foreach ($frm as $key => $value) {
        // do whatever manipulation with the keys or values
} $smarty->assign("frm",$frm); and then in your template do: {$frm.image_hans} That makes it easier to handle, rather than using tons of single variables. Cheers, Martin. Martin Kloss martin.kloss@triquart.de Technische Direktion ************************ Triquart Neue Medien Bellealliancestr.17 20259 Hamburg Germany Tel.+49 (40)432 923-0 Fax +49 (40)432 923-23 www.triquart.de www.triquart-humor.de ************************* "Lingo objektorientiert" Das Buch zum Autor jetzt bestellen unter: http://www.amazon.de/exec/obidos/ASIN/3898422194/lingmmugd

« previous php.smarty.general (#10088) next »