This tutorial shows how to get taxonomy terms names in Drupal 7. First how to get all taxonomy terms, how to get categories by a parent and with a little effort, you can turn it into a treeview.
Get All Taxonomy Terms Names:
Source code viewer
$terms = db_query('SELECT name FROM taxonomy_term_data'); foreach ($terms as $term) { echo $term->name; }Programming Language: PHP
Get Taxonomy Terms Names Of Certain Parent:
This query gets all taxonomy terms names of certain parent. In this case it gets all the main terms. You can make a recursive function and make a treeview of categorie names. Tutorial that shows how to make recursive funtion: Tutorial: Create Treeview Using Recursion in PHP.Source code viewer
$terms = db_query('SELECT taxonomy_term_data.name AS name, taxonomy_term_data.tid AS tid FROM taxonomy_term_data, taxonomy_term_hierarchy WHERE taxonomy_term_data.tid = taxonomy_term_hierarchy.tid AND taxonomy_term_hierarchy.parent = 0'); foreach ($terms as $term) { echo $term->name; }Programming Language: PHP