How to get child terms based on parent terms between two different taxonomies I have created two vocabulary


Program
Topics


I want to load the topics based on the program selection.

It looks like category and subcategory.

I created some program like java, .net, PHP 
and I created some topics like session (php), inheritance(java), cookie(php).

So now I want to list all the topics which are coming under a particular program.

Can you tell me which  drupal function used to get all the terms under parent terms.?

Note: taxonomy_get_children not working because I am using two vocabularies
You'll need to load your content's term references and then load those term entities so you can follow your chain of taxonomy terms. There's many ways to do that; taxonomy_term_load_multiple() is one such function.

$tids = array();

// @TODO: Use the $nid that corresponds with your node 
// @TODO: Replace field_program &amp; field_topic with your taxonomy ref field name
$node = node_load($nid);
foreach ($node-&gt;field_programs[LANGUAGE_NONE] as $term) {
  $tids[] = $term['tid'];
}
$programs = taxonomy_term_load_multiple($tids);

// @TODO: Iterate over $programs and retrieve 
// topic tid references from $program-&gt;field_topic[LANGUAGE_NONE]