I begged for the PHP + SMARTY three-level classification method. Online waiting for a rush to seek PHP + SMARTY three-level classification methods are all given. Online and other urgent
Three levels of foreach can be used to loop three levels of classification. Please advise.
Reply to discussion (solution)
See Tutorial: http://www.smarty.net/docs/zh_CN/language.function.function.tpl
See Tutorial: http://www.smarty.net/docs/zh_CN/language.function.function.tpl
I successfully realized the infinite classification by using this method http://blog.csdn.net/circle001/article/details/6756469
But the problem comes again,
<{Function name = menu}>
<{Foreach $ data as $ entry}>
-
<{$ Entry. name}> <{* Note that the field must be changed to your own field. *}>
<{If isset ($ entry. child)}>
<{Call name = menu data = $ entry. child}>
<{/If}>
<{/Foreach}>
<{/Function}>
<{Call name = menu data = $ arr}>
Follow his methods. You can use DIV to have layers... If you . How can lower-level classification be achieved. Indent ..... Give it a sense of attention ....
How can this problem be solved. Thank you!
You have done it yourself. Thank you! @ xuzuning