Help alphabetically sorting $terms from get terms('wpsc_product_category'
I'm trying to get a list of wpsc_product_category terms, for a given category, and have them display in alphabetical order (by name) with links to their pages.
This gives me the right list, but the sort() doesn't work. The terms aren't in alphabetical order. Any help would be greatly appreciated!
?php
//display sorted list of wpsc product categories
$category_id = 10;
$terms = get_terms('wpsc_product_category','hide_empty=0parent='.$category_id);
sort($terms);
if ($terms) {
foreach($terms as $term) {
?
div
div class="caption transparent_class"
a href="?php get_term_link( $term-slug, 'wpsc_product_category'); ?" class="wpsc_category_link"?php echo $term-name; ?/a
?php if(get_option('wpsc_category_description')) :?
?php echo 'div class="wpsc_subcategory"'.$term-description.'/div'; ?
?php endif;?
/div
/div
?php
}
}
?
Topic terms plugin-wp-e-commerce sort Wordpress
Category Web