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!