“);
$sub_items = array();
// call function to find all nodes in a term
$sub_items = get_nodes_in_term(17);
$output .= “
- “;
// Add nodes to items array
foreach($sub_items as $val) {
$output .= $val;
}
$output .= “
“;
print $output;
function get_nodes_in_term($tid) {
$sub_items = array();
$sql = “SELECT node.title, node.nid FROM node INNER JOIN term_node ON node.nid = term_node.nid WHERE term_node.tid = $tid ORDER BY node.title”;
$result = db_query($sql);
while ($anode = db_fetch_object($result)) {
$sub_items[] = “
“;
}
return $sub_items;
}
?>
“);
$sub_items = array();
// call function to find all nodes in a term
$sub_items = get_nodes_in_term(17);
$output .= “
- “;
// Add nodes to items array
foreach($sub_items as $val) {
$output .= $val;
}
$output .= “
“;
print $output;
function get_nodes_in_term($tid) {
$sub_items = array();
$sql = “SELECT node.title, node.nid FROM node INNER JOIN term_node ON node.nid = term_node.nid WHERE term_node.tid = $tid ORDER BY node.title”;
$result = db_query($sql);
while ($anode = db_fetch_object($result)) {
$sub_items[] = “
“;
}
return $sub_items;
}
?>
Leave a Reply