How do I print a term list but alter the link text?

<?php 
    $terms = get_terms( $taxonomies, $args );
    $term_name_array = array();
    foreach($terms as $term){
        $term_name_explode = explode("-",$term->term_name);
            $myterm_name="";
            for($i=0;$i<count($term_name_explode)-2;$i++){
               $myterm_name.=" ".$term_name_explode[$i];
            }
            $myterm_name = ltrim($myterm_name);
        if(in_array($myterm_name,$term_name_array))
            continue;
        $term_name_array[] = $myterm_name;
        ?>
            <li><a href="https://wordpress.stackexchange.com/questions/48983/<?php echo get_term_link($term->term_id)?>"><?php echo $myterm_name;?></a></li>
        <?
    }
?>

error code: 523