Get Attachment Category Name

The answer was found here: http://www.wprecipes.com/how-to-display-category-name-without-link

For my purposes, I needed to define the category function and then call it by name-only inside the php echo:

     <?php
$category = get_the_category($attachment->ID);
    echo 'html goes here';
    echo ''.$category[0]->cat_name.';
    ?>

Additionally, to help eliminate space or punctuation in the category name, it can display the slug instead:

<?php
$category = get_the_category($attachment->ID);
    echo 'html goes here';
    echo ''.$category[0]->slug.';
    ?>