[Difficult] the array of the smarty template seems to be completely equivalent. why? $ Arr = array (& quot; a & quot; = & gt; array (1, 2, 3), & quot; B & quot; = & gt; array (& quot; c & quot; = & gt; array (& [difficult] the array of the smarty template seems completely equivalent. why?
$ Arr = array ("a" => array (1, 2, 3 ), "B" => array ("c" => array ("d" => array ("e" => "Tom ", "f" => "BeiJing "))));
$ Smarty-> assign ("A", $ arr );
$ Smarty-> display ("testTwo.html ");
HTML code
{$ A ['B']. c ['D']. e}
{$ A ['B']. c ['D']. e} {$ A ['B']. c ['D']. e} {$. b. c. d. e}
A. B = a ['B']
Http://topic.csdn.net/u/20120612/22/8610da65-573c-462e-b4b6-2175551441b0.html
------ Solution --------------------
Indeed, all three cases can be resolved in smarty:
HTML code
{$ A ['B']. c ['D']. e}
{$ A. B. c. d. e}
{$ A ['B'] ['c'] ['D'] ['E']}
------ Solution --------------------
Variables in the smarty Template
It can be an associated variable. join with '.' and always include the following before.
It can be A numeric variable, for example, $ A [0] [1]. of course, you can also change it to A key value $ A ['key1'] ['key2'].
For details, refer
Http://0512on.com/bbs/forum.php? Mod = viewthread & tid = 2400 & extra =