getsonids

PHP foreach 一点细节

//非正常function getSonIDs(&$list, $fid = 0){ static $ids = array(); foreach($list as $id => $pid){ if($pid == $fid){ unset($list[$id]); $ids[] = $id;