I'm using the below code from WordPress' get_tags Function Reference page
$tags = get_tags();
$html = '<div class="post_tags">';
foreach ($tags as $tag){
$tag_link = get_tag_link($tag->term_id);
$html .= "<a href='{$tag_link}' title='{$tag->name} Tag' class='{$tag->slug}'>";
$html .= "{$tag->name}</a>";}
$html .= '</div>';
echo $html;
In my functions.php file I have a number of defined constants.
define('xyz_city','New York');
I need to insert a constant into the tag link title (line 5 of above code). So instead of .....
title='{$tag->name} Tag'
it needs to be .....
title='{$tag->name} [insert xyz_city]'
But it's proving beyond my ability. Normally I echo the constants in like this
<?php echo xyz_city ;?>