I would like to bring in terms (just parents) from one taxonomy vocabulary to use as options in a form but I can't seem to pull them in. I thought taxonomy_vocabulary_machine_name_load would work but I can't seem to get the terms to show up.
$topic_options = array();
$name = 'web_topics';
$myvoc = taxonomy_vocabulary_machine_name_load() as $name => $vocabulary;
$tree = taxonomy_get_tree($myvoc->vid);
foreach ($tree as $term) {
$topic_options[$name] = $vocabulary->name;
}
$topic_options[$term->tid] = $term->name;