1. Go to this page and download the library: Download abell/tools library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
abell / tools example snippets
bash
use Abell/AeArrayTool;
...
public function hello()
{
$array = [
['id'=>1,'pid'=>0,'name'=>'学生'],
['id'=>2,'pid'=>1,'name'=>'小敏'],
['id'=>3,'pid'=>0,'name'=>'老师'],
['id'=>4,'pid'=>3,'name'=>'张三'],
['id'=>5,'pid'=>1,'name'=>'小红']
];
$result = AeArrayTool::getTree($array);
return json_encode($result);
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.