The code below shows how to load taxonomy terms in alphabetical order in Drupal 7.
Getting all child terms in Drupal 7 vocabulary try the code.
$cc=array(); $tax=taxonomy_vocabulary_machine_name_load($name); $vid= $tax->vid; $child_terms = taxonomy_get_tree($vid); foreach($child_terms as $values) { $tname=$values->name; $cc[] = $tname; }
Leave a Reply