亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

Home PHP Libraries Other libraries PHP unlimited classification method class
PHP unlimited classification method class
<?PHP
header("Content-type: text/html; charset=utf-8");
 
$link = mysql_connect('localhost','root','eric') or die(mysql_error());
mysql_select_db('sortclass',$link);
 
class SortClass{
  var $data = array();
  var $child = array(-1=>array());
  var $layer = array(-1=>-1);
  var $parent = array();
  var $link;
  var $table;
  function SortClass($link, $table){
    $this->setNode(0, -1, '頂極節(jié)點(diǎn)');
    $this->link = $link;
    $this->table = $table;
    $node = array();
    $results = mysql_query('select * from '.$this->table.'',$this->link);
    while($node = mysql_fetch_assoc($results)){
      $this->setNode($node['cid'],$node['pid'],$node['cname']);
    }
  }

This is an implementation library for PHP infinite splitting, with two methods: recursive and non-recursive. Friends who need it can download it and use it.


Disclaimer

All resources on this site are contributed by netizens or reprinted by major download sites. Please check the integrity of the software yourself! All resources on this site are for learning reference only. Please do not use them for commercial purposes. Otherwise, you will be responsible for all consequences! If there is any infringement, please contact us to delete it. Contact information: admin@php.cn

Related Article

How Do I Link Static Libraries That Depend on Other Static Libraries? How Do I Link Static Libraries That Depend on Other Static Libraries?

13 Dec 2024

Linking Static Libraries to Other Static Libraries: A Comprehensive ApproachStatic libraries provide a convenient mechanism to package reusable...

php function vs method in a class php function vs method in a class

23 Jul 2025

function is an independent function, suitable for general functions; method is part of the class, suitable for encapsulating object behavior. Function can be called directly, with global scope, cannot access class attributes, does not support object-oriented features, and is suitable for small scripts; method needs to be called through objects or classes, belongs to the class, can access private attributes, supports inheritance polymorphism, and is suitable for large project structures. Function or method should be used according to whether the status and encapsulation are required.

How to Silence TensorFlow\'s Debugging Output? How to Silence TensorFlow\'s Debugging Output?

28 Oct 2024

Suppression of Tensorflow Debugging OutputTensorflow prints extensive information about loaded libraries, found devices, and other debugging data...

How to Get the Class Name from an Extended PHP Class in a Static Method Call? How to Get the Class Name from an Extended PHP Class in a Static Method Call?

01 Nov 2024

Obtaining Class Name from Extended PHP Class Static CallIn object-oriented programming, classes often extend base classes to inherit and extend...

How Does jQuery Simplify DOM Manipulation for Web Developers? How Does jQuery Simplify DOM Manipulation for Web Developers?

03 Jan 2025

Overflow: Hidden and Expansion of HeightjQuery distinguishes itself from other JavaScript libraries through its cross-platform compatibility and...

Can I retrieve the correct class name from a static method call in an extended PHP class? Can I retrieve the correct class name from a static method call in an extended PHP class?

01 Nov 2024

Retrieving Class Name from Static Calls in Extended PHP ClassesProblem:A PHP class hierarchy exists, with a base class Action and an extended...

See all articles