To display the last element of any array in a tpl file, you can use this construction, suggested by one very good person

<?php $i = 1; ?>
<?php foreach( $linked_categories as $linked_category ){ ?>
   <?php if (count($linked_categories) == $i) { ?>
     <a href="<?php echo $linked_category['href']; ?>"><?php echo $linked_category['name']; ?></a>
     <?php } ?>
     <?php $i++; ?>
<?php } ?>