Skip to main content
improved punctuation, and grammar
Source Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284

try this oneYou can use field_info_instance(), as in the following snippet.

$info = field_info_instance('node','enter_your_field_name','enter_content_type_name');
 
foreach ($info as $ps2 => $key) {
  echo "Info [ $ps2 ] : " . $key . "<br />";
}

ByIn this way, you get, Term id the term ID.

try this one

$info = field_info_instance('node','enter_your_field_name','enter_content_type_name');
 
foreach ($info as $ps2 => $key) {
echo "Info [ $ps2 ] : " . $key . "<br />";
}

By this way you get, Term id

You can use field_info_instance(), as in the following snippet.

$info = field_info_instance('node','enter_your_field_name','enter_content_type_name');
foreach ($info as $ps2 => $key) {
  echo "Info [ $ps2 ] : " . $key . "<br />";
}

In this way, you get the term ID.

Source Link
user7048
user7048

try this one

$info = field_info_instance('node','enter_your_field_name','enter_content_type_name');

foreach ($info as $ps2 => $key) {
echo "Info [ $ps2 ] : " . $key . "<br />";
}

By this way you get, Term id