Update แบบ fix field นั้นๆ ว่าจะเป็นค่าอะไร
Update แบบ fix field นั้นๆ ว่าจะเป็นค่าอะไร
Drupal 7
เราใช้ ฟังชั่น taxonomy_term_load()
สำหรับ tid ตัวเดียว
<?php
$term = taxonomy_term_load($tid);
$name = $term->name;
?>
สำหรับ หรับ tid หลายตัว
<?php
$tids = array(1, 2, 3);
$terms = taxonomy_term_load_multiple($tids);
foreach ($terms as $term) {
$name = $term->name;
}
?>