I begged for the PHP + SMARTY three-level classification method. Online waiting-php Tutorial

Source: Internet
Author: User
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

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.