Adding variable for post title so post template can include auto-generated link to view on external website.com/{post title}

OH I figured it out.

     <?php $myvariable = get_the_title( "'. '', false );
        echo "<a href="https://wordpress.stackexchange.com/questions/372492/website.com/view/$myvariable">View on website.com</a>";
        ?>

Hopefully this helps someone else!

tech