Getting a taxonomy-term-name as plain-text in computed field
calling field_get_items() on a term reference field returns an array like this


Array(
  0 => Array(
    'tid' => 10,
  ),
)


to get the term name from the term id (tid) you should load the taxonomy term:


$field_myterms = field_get_items($entity_type, $entity, 'field_myterms');
if (!empty($field_myterms)) {
  $term = taxonomy_term_load($field_myterms[0]['tid']);
}


$term is an stdClass object: 


stdClass Object
(
    [tid] => 1
    [vid] => 1
    [name] => test
    [description] => 
    [format] => filtered_html
    [weight] => 0
    [vocabulary_machine_name] => tags
    [rdf_mapping] => Array
        (
            [rdftype] => Array
                (
                    [0] => skos:Concept
                )

            [name] => Array
                (
                    [predicates] => Array
                        (
                            [0] => rdfs:label
                            [1] => skos:prefLabel
                        )

                )

            [description] => Array
                (
                    [predicates] => Array
                        (
                            [0] => skos:definition
                        )

                )

            [vid] => Array
                (
                    [predicates] => Array
                        (
                            [0] => skos:inScheme
                        )

                    [type] => rel
                )

            [parent] => Array
                (
                    [predicates] => Array
                        (
                            [0] => skos:broader
                        )

                    [type] => rel
                )

        )

)


to set the computed field value:


$entity_field[0]['value'] = drupal_clean_css_identifier($term->name);