1) Pass an empty string as the path.
2) Set external to 'true' (this removes the preceding slash).
3) pass ' ' (a space) as the fragment .

Example :
l(t('My Example Link'), '', array('external' => TRUE, 'fragment' => ' '));

Comments

BlackyWhoElse’s picture

Doesn't know if its a question but here tahts like i would do it :D

<?php
l(t('My Anchor Link'), '', array(
  'fragment' => ' ',
  'external' => TRUE,
  'attributes' => array(
    'title' => 'Title here.'
  ),
));
?>
Output : 
<a href="# " title="Title here.">My Anchor Link</a>

Output :
My Anchor Link