taxonomy_get_term
- Versions
- 4.6 – 6
taxonomy_get_term($tid)
Return the term object matching a term ID.
Parameters
$tid A term's ID
Return value
Object A term object. Results are statically cached.
Code
modules/taxonomy/taxonomy.module, line 1007
<?php
function taxonomy_get_term($tid) {
static $terms = array();
if (!isset($terms[$tid])) {
$terms[$tid] = db_fetch_object(db_query('SELECT * FROM {term_data} WHERE tid = %d', $tid));
}
return $terms[$tid];
}
?>Login or register to post comments 