function getinfo($pid){ $str = ‘‘; $row = M(‘user‘)->where(array(‘pid‘=>$pid))->select(); if($row){ foreach($row as $key => $val ){ $str .= ‘,‘.$val[‘id‘]; $str .= getinfo($val[‘id‘]); } } return $str; }
时间: 2024-10-11 22:59:45
function getinfo($pid){ $str = ‘‘; $row = M(‘user‘)->where(array(‘pid‘=>$pid))->select(); if($row){ foreach($row as $key => $val ){ $str .= ‘,‘.$val[‘id‘]; $str .= getinfo($val[‘id‘]); } } return $str; }