How do I add a link to a table row in a custom module? I am making a sortable table in a custom module. If I put the whole link as part of the row information, the URL does not come out right. 

I tried the following code.

  array(
    'data'=&gt;array(
      '#title' =&gt; $entry['name'],
      '#type' =&gt; 'link',
      '#url' =&gt; $entry['link_url'],
    )
  )


I also tried what suggested on https://www.drupal.org/node/745272,  which describes how to do it for Drupal 7. 

I also tried this code.

 $rows[] = array(
   array(
     'data' =&gt; array(
       'name' =&gt; new FormattableMarkup('&lt;a href=":link"&gt;@name&lt;/a&gt;', [':link' =&gt; $entry['link_url'], '@name' =&gt; $entry['name']])
     )
   )
 );


Neither displays anything. 

How do I achieve this for Drupal 8?
This worked for me

use Drupal\Component\Render\FormattableMarkup;  
  $rows[] = array(

      array('data' =&gt; new FormattableMarkup('&lt;a href=":link"&gt;@name&lt;/a&gt;', 
        [':link' =&gt; $entry['link_url'], 
        '@name' =&gt; $entry['name']])
      ),