add link programmatically to views field Drupal 7 I am generating views result using ldap query and eliminating some result by checking it against Drupal node title using hook_views_pre_render() and looping through views result.

I want to add link to this ldap views using Drupal node id.

Tried adding in the same pre_render function using drupal l() function. But it displays full html i.e

    &lt;a href='node/nid'&gt;title&lt;/a&gt; 


instead of html.

Can anyone help resolving this issue?

Thanks...
Instead of coding why you don't use views fields.


Add the title and node id fields to the view.
Exclude them from display.
Add a global: custom text field.
Use tokens to print the HTML you want.


It should look like this:

&lt;a href="/node/[nid]"&gt;[title]&lt;/a&gt;