custom post type tags

I use this function to display comma separated terms from a custom taxonomy:

// Get Comma Seperated List of Custom Taxonomy //
function the_custom_taxonomies($taxonomy) {
    global $post;
    $terms = get_the_terms($post->ID, $taxonomy);
    $counter = 0;
    if (!empty($terms)) {
        foreach ($terms as $term) {
            echo $term->name;
            if (++$counter < count($terms))
                echo ", ";
        }
    }
}