Skip to main content

array

array

<!--?php

$nid=51245;

$query_key=mysql_query("select td.name  from node n inner join term_node tn ON n.nid = tn.nid
 LEFT JOIN term_data td ON tn.tid = td.tid where n.nid=$nid and td.vid in ('7')");

while($rows = mysql_fetch_assoc($query_key)) {
 $row .= $rows['name'].", "; 
}
echo $str = rtrim($row,", ");

//$terms = taxonomy_node_get_terms($nid);// get term from nodes
//rsort($terms); //rsort() just sort an array in reverse order
//$myterm = $terms[0]--->
<p>name; //get a value //echo $myterm; ?&gt;</p>
 

Help us tell the story of America.

For over 75 years, American Heritage has chronicled our nation's history like no other publication. Please support our trusted, non-partisan historical writing and the volunteers that sustain it by donating today. We rely on contributions from readers like you to survive.
Donate