Think implement Microsoft Official website navigation problem PHP infinite pole classification Multi-table query problem

Source: Internet
Author: User

I use the thinkphp developed, navigation solutions, products and services are a class classification, environmental protection is a class two classification. Level two category below is a list of articles.
I loop through two cycles through the recursive multidimensional array method to cycle through the first class and the two level classification. The question now is how to get a list of the articles under level two classification?


  
   Use 
   
    admin\model\category;                    $cate =m (' Cate ')->order (' sort ')->select ();                    Import ("Admin.Model.Category"); $cate =category::unlimitedforlayer ($cate);//multidimensional array reading infinite pole classification
   
                  
  
    • {$v. Name}

      {$value. Name}

      • List of articles

Reply content:

I use the thinkphp developed, navigation solutions, products and services are a class classification, environmental protection is a class two classification. Level two category below is a list of articles.
I loop through two cycles through the recursive multidimensional array method to cycle through the first class and the two level classification. The question now is how to get a list of the articles under level two classification?


  
   
     use admin\model\category;                    $cate =m (' Cate ')->order (' sort ')->select ();                    Import ("Admin.Model.Category"); $cate =category::unlimitedforlayer ($cate);//multidimensional array reading infinite pole classification 
   
                  
  
    • {$v. Name}

      {$value. Name}

      • List of articles

In PHP once again based on the list ID, query the corresponding article data!

  • 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.