![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
YII
csdn_jiangpeng
这个作者很懒,什么都没留下…
展开
-
无限极分类
function getTreeFromArray($data, $pid = 0, $key = 'id', $pKey = 'parent_id', $childKey = 'child', $maxDepth = 0, $level = 0){ static $depth = 0; $depth++; $level++; $tree = array();原创 2017-02-09 18:02:09 · 242 阅读 · 0 评论 -
PHP 导出Csv
/** * 导出Csv * * @param array $headers 标题行,| 后面表示默认值,如:['id' => 'ID|0' , 'name' => '姓名|/' , 'age' => '年龄|0'] * @param array $data 数据 * 如:[['id' => 1 , 'name' =>...原创 2019-08-12 16:57:35 · 120 阅读 · 0 评论