How can I get the terms of a vocabulary using vocabulary machine name.
I have used the following code, although it works for me but I am looking for efficient methods.
$vocabulary = taxonomy_vocabulary_machine_name_load('school_courses');
$terms = taxonomy_get_tree($vocabulary->vid);
$courses = array();
foreach($terms as $term) {
$courses[$term->tid] = $term->name;
}