Drupal6 - Getting term id from term name
Hi
Suppose I开发者_StackOverflow have a term name called "product" and the term id is "123", how can I use the term name "product" to get the term id "123"?Thanks
$get_term = taxonomy_get_term_by_name('product');
$term_id = $get_term[0]->tid;
This should work for you.
use this function
taxonomy_get_tid_by_name('product')
return value is array .
精彩评论