// create the selection query to find the list of sections $ids = sql_get_select('DISTINCT(id_rubrique)', 'spip_articles', array('id_article > 200')); // select the titles of those sections $res = sql_select('titre', 'spip_rubriques', sql_in('id_rubrique', $ids)); while ($r = sql_fetch($res)) { // display each title. echo $r['titre'] . '
'; }