How to implement php infinite classification recursive sorting, php infinite recursive sorting
The example in this article describes the implementation method of PHP Infinitus classification recursive sorting. Share it with everyone for your reference. The specific implementation method is as follows:
Copy code The code is as follows:
function order ($array,$pid=0){
$arr = array();
foreach($array as $v){
If($v['pid']==$pid){
$arr[] = $v;
$arr = array_merge($arr,order($array,$v['id']));
}
}
Return $arr;
}
I hope this article will be helpful to everyone’s PHP programming design.
http://www.bkjia.com/PHPjc/909337.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/909337.htmlTechArticlephp infinite classification recursive sorting implementation method, php infinite recursive sorting This article describes the example of php infinite classification recursive sorting implementation method. Share it with everyone for your reference. Specific implementation method...