Formats an internal or external URL link as an HTML anchor tag.
This function correctly handles aliased paths, and adds an 'active' class attribute to links that point to the current page (for theming), so all internal links output by modules should be generated by this function if possible.
However, for links enclosed in translatable text you should use t() and embed the HTML anchor tag directly in the translated string. For example:
t('Visit the <a href="@url">settings</a> page', array('@url' => url('admin')));
This keeps the context of the link title ('settings' in the example) for translators.