Smarty setting arrays

From: Date: Thu, 01 Nov 2001 10:00:16 +0000
Subject: Smarty setting arrays
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-1774@lists.php.net to get a copy of this message
I developed a routine and send it to Monty and Andrei. The functions strip strings and make arrays from it. Like this: {command users@name="Roberto" users@age="18" options@city@NY="0" options@city@Chicago="1"} come $users = array("name" => "Roberto", "age" => "18"); $options = array("city" => array("NY"=>0,"chicago"=>1)); I use this with "insert" functions, but now I added to "custom" functions too and maybe Andrei or Monte can add this string to array in others things of Smarty like: insert, custom functions, assign. With insert and custom functions are easy. But with assign to string we'll use {assign val="some" and value="me"} but with arrays we need to change to {assign array="some" something@foo="123" other@foo@me="666"} Now, I need to ask: Vars doesnt work with {insert}? I try: {assign var="thing" value="666"} {insert name="form" element=$thing} And doesnt work. Why? and I think they Atenciosamente, Roberto Berto' ---------------- roberto@berto.net eConsultor 0(XX)51 32270599 -> Horario preferencial: 13h - 20h 0(XX)51 91169628 -> Em outros horarios

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