PHP implements a class-free recursive classification (thinkphp framework), stepless thinkphp
/* * * class Recursive class * @param int $assortPid the parent id* @param mixed to query the taxonomy $tag Delimiter between subordinate categories * @return string $tree Returns the category tree structure result **/function Recursiveassort ($assortPid$tag = ") { $assort$assortPid ")->field (' class_id, class_name '),Select (); foreach ($assortas$value) { $tree . = '$tag $value [' Class_name ']. ''; $tree . = Recursiveassort ($value$tag . "); } return $tree ;}
http://www.bkjia.com/PHPjc/1040158.html www.bkjia.com true http://www.bkjia.com/PHPjc/1040158.html techarticle PHP implements a class-free recursive classification (thinkphp framework), stepless thinkphp/* * * * * * class Recursive classification * @param int $assortPid to query the parent of the classification id* @param mixed between the hierarchy and subordinate categories ...