[难]在smarty模板中,下面的语句可能是什么意思?
A[b].c[d].e
------解决方案--------------------
<br /> <?php<br /> $arr = array(<br /> 'A[a]'=>array('C[d]'=>array('e'=>'hello world')),<br /> );<br /> print_r($arr);<br /> print_r($arr['A[a]']);<br /> <br />
<br /> $arr = array("a"=>array(1,2,3),"b"=>array("c"=>array("d"=>array("e"=>"Tom","f"=>"BeiJing"))));<br /> $smarty->assign("A",$arr);<br /> $smarty->display("testTwo.html");<br />
<br /> <!--testTwo.html--><br /> <br /> {$A['b'].c['d'].e}<br /> <!-- 输出Tom --><br />