摘要: 组装查询条件条件 注意这里store_ids是数组格式 if(isset($params['store_ids'])&&!empty($params['store_ids'])) { $store_ids=$params['store_ids']; $sql_where=''; foreach($s 阅读全文
posted @ 2021-12-17 17:31 浪、子 阅读(1556) 评论(0) 推荐(0) 编辑
摘要: function getParents($id, $list,$parents = []) { //改变数组的key值 $list = array_column($list, NULL, 'id'); // echo "<pre>"; print_r($list);die; //改变后的数组 // 阅读全文
posted @ 2021-12-17 16:02 浪、子 阅读(517) 评论(0) 推荐(0) 编辑
摘要: 一、数组 $categories = array( array('id'=>1,'name'=>'陕西','parent_id'=>0), array('id'=>2,'name'=>'西安','parent_id'=>1), array('id'=>3,'name'=>'长安区','parent_ 阅读全文
posted @ 2021-12-17 10:39 浪、子 阅读(281) 评论(0) 推荐(0) 编辑
摘要: 一、数组 $categories = array( array('id'=>1,'name'=>'陕西','parent_id'=>0), array('id'=>2,'name'=>'西安','parent_id'=>1), array('id'=>3,'name'=>'长安区','parent_ 阅读全文
posted @ 2021-12-17 10:17 浪、子 阅读(284) 评论(0) 推荐(0) 编辑