PHP Unlimited class classification PHP infinite pole classification display PHP infinite pole classification drop-down box PHP infinite pole classification letter

Source: Internet
Author: User
If you write a system, you will often use the column management

Column Classification Multi-level more need to achieve unlimited class classification, the code is as follows

One, the use of the drop-down menu

/*  Infinite class * * logical recursive Get type *hid ancestor column ID *step subordinate column prefix *tid seleted option ID */function logicgettypelist ($datatable = ' Lanmu_class ', $hid =0, $step = ", $tid =-1) {static $TypeList ="; $query = "select * from ' $datatable ' WHERE heid= $hid ORDER by px ASC"; $arrs =m Ysql_query ($query), while ($row = @mysql_fetch_assoc ($arrs)) {echo $step; $TypeList. = ("". $step. $row [' class ']." \ r \ n ");  Category name Logicgettypelist ($datatable, $row [' id '], $step. '--', $tid);} return $TypeList;}

Second, column management

The code is probably as follows and needs to be modified according to the situation

 
  
 
  
 
  
 
  "Size=" 3 "  echo $row [' id '];? >,this.value) "/>"    "> Edit" "'}" > Delete "" "> Picture Set" 
 
  
 
  

The above introduces the implementation of PHP Unlimited class classification, including PHP, infinite level of content, I hope that the PHP tutorial interested in a friend helpful.

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