How to theme table row to link particular column data?
You can try using the render element syntax for a Link element, like this:

$rows[] = array(
  'name' =&gt; array(
    '#title' =&gt; $row-&gt;name,
    '#type' =&gt; 'link',
    '#url' =&gt; $profile_url
  ),
  'mail' =&gt; array(
    '#title' =&gt; $row-&gt;mail,
    '#type' =&gt; 'link',
    '#url' =&gt; 'mailto:' .  $row-&gt;mail,
  ),
);


That way you can stick to a more consistent coding style, i.e. render arrays for presentation.