Ask a smarty question and pass two arrays to the template. $ ports and $ type contain the subscript of the element $ type, now you need to display the $ type description corresponding to each element in $ ports & lt; {sectionname = wordloop = $ ports} & gt; & lt; {$ ports [word for a question about smarty.
Two arrays, $ ports and $ type, are passed to the template.
The $ ports element contains the subscript of the $ type element. The $ type description corresponding to each element in $ ports must be displayed.
<{Section name = word loop = $ ports}>
<{$ Ports [word]. comment}> <{$ ports [word]. valuetype}>
<{$ Type [$ aports [word]. valuetype]. descript}>
<{/Section}>
The separately displayed <{$ ports [word]. valuetype}> can be displayed normally, but the two arrays are used together.
<{$ Type [$ aports [word]. valuetype]. descript}>
The following error is reported.
Fatal error: Smarty error: [in client_info.htm line 120]: syntax error: unrecognized tag: $ type [$ ports [word]. valuetype]. descript (Smarty_Compiler.class.php, line 446) in E: \ xampp \ htdocs \ sydx \ include \ Smarty \ libs \ Smarty. class. php on line 1093
How can I solve this problem? thank you!
------ Solution --------------------
<{$ Type [{$ aports [word]. valuetype}]. descript}>
Try this way
------ Solution --------------------
Check whether your template file has any symbols missing. Try more.
------ Solution --------------------
<{Section name = word loop = $ ports}>
<{$ Ports [word]. comment}> <{$ ports [word]. valuetype}>
<{$ Type [$ aports [word]. valuetype]. descript}>
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.