static function getChilds($id_rubrique = 0) { global $dbh; if (!$id_rubrique) { $id_rubrique = $this->id_rubrique; } $tab_childs = array(); $q = "select id_rubrique from rubriques where num_parent='" . $id_rubrique . "' "; $r = mysql_query($q, $dbh); while ($row = mysql_fetch_object($r)) { if (!array_key_exists($row->id_rubrique, $tab_childs)) { $tab_childs = $tab_childs + rubriques::getChilds($row->id_rubrique); } $tab_childs[$row->id_rubrique] = 1; } return $tab_childs; }