Skip to main content
1 of 2
houmem
  • 129
  • 2
  • 4

The following function returns the name of a taxonomy term based on its tid:

function get_term($tid) {
  return db_select('taxonomy_term_data', 't')
  ->fields('t', array('name'))
  ->condition('tid', $tid)
  ->execute()
  ->fetchField();

}

houmem
  • 129
  • 2
  • 4