How To Change The $tid to $term_name
To convert from $tid to term name, use  taxonomy_term_load() to load the object, and then access $term-&gt;name:

$term = taxonomy_term_load($tid);
$term_name = $term-&gt;name;


Your function should look like:

function MYTHEME_preprocess_node(&amp;$vars) {
  if (array_key_exists('content', $vars)) {
    $content = &amp;$vars['content'];
      if (array_key_exists('field_photo_topic', $content)) {
      foreach ($content['field_photo_topic']['#items'] as $index =&gt; $info) {
        $tid = $info['tid'];
        $term = taxonomy_term_load($tid);
        $term_name = $term-&gt;name;
        $content['field_photo_topic'][$index]['#href'] = 'photos/' . $term_name;
      }
    }
  }
}


Please note that this will only work the way you intend if you use PathAlias or similar to alias the path to be accessible by  term name instead of numeric $tid.