从WordPress功能中剥离标签

Trying to print my custom post type's taxonomy but without the link. Tried this, but doesn't seem to work, any suggestions?

$text = the_terms($post->ID,'type','','',''); 
echo strip_tags($text);

Any help would be greatly appreciated... I'm about to start punching babies.

the_terms() display the terms, but you cant store them into a variable because they are echoed. You should try get_terms() instead.

$myterms = get_terms('category', 'orderby=count&hide_empty=0');

For future use, the the_something() methods print the specific content ito the template and the get_something() methods return the content so you can store it into a variable.