$vid = 2577; // Set the vid to the vocabulary id of the vocabulary you wish to list the terms from
$tid = 4662; //if you need to use a term also
$pole = array();
$items = array();
$terms = taxonomy_get_tree($vid, $tid);
//$terms = taxonomy_get_tree($vid);
$output .= "

    \n";
    foreach ( $terms as $term ) {
    //$output .= "
  • \n";
    //$output .= l($term->name, "mic/$term->tid");
    $results = taxonomy_select_nodes(array($term->tid), 'or', 0, FALSE, 'n.sticky DESC, n.created DESC') ;
    //$output .= "
      \n";
      while ($node = db_fetch_object($results)) {
      $output .= "
    • nid\"> $node->title \n";
      $loaded = node_load($node->nid, NULL, FALSE);
      $output .= "
        \n";
        foreach($loaded->taxonomy as $loaded_term){
        //$output .= "
      • ";
        if ($loaded_term->vid!=2577){
        $output .= "
      • tid\"> $loaded_term->name \n";
        }
        //$output .= l($loaded_term->name, mic_resource/$loaded_term->tid);
        }
        //$output .= "

      \n";
      //>contents['field_core_component']
      }
      $output .= "

    \n";
    }

    $output .= "

\n";
print $output;
?>