smarty中括号语法有关问题

WBOY
Release: 2016-06-13 13:15:55
Original
1138 people have browsed it

smarty中括号语法问题
 
错误
 {$data["bank_data"]["Arrangement"]["id"]} 

PHP (5.3.9) ERROR (E_USER_ERROR):
File: Smarty.class.php
Line: 1092
Type: Smarty error: [in tke-g-admin_scopeofwork.tpl line 10]: syntax error: unrecognized tag: $data["bank_data"]["Arrangement"]["id"] (Smarty_Compiler.class.php, line 446)
正确
 {$data.bank_data.Arrangement.id} 

第一个为什么错误呢 ?

------解决方案--------------------
Smarty 就是这么约定的!没有为什么
------解决方案--------------------

------解决方案--------------------
确定?这样试试:

PHP code

$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"); <div class="clear">
                 
              
              
        
            </div>
Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template