user968808
user968808

Reputation:

How to add target attribute to anchor tag to open hyperlink in a new tab or window?

I have the code below to make part of my rss feed a hyperlink but how to i change this to make the link open in a new tab or a new window.

print "<a href=\"$this->link\">";

I tried adding target="_blank"but was not sure how to add it.

Upvotes: 0

Views: 3731

Answers (2)

Zul
Zul

Reputation: 3608

print "<a href='$this->link' target='_blank'>";   

Upvotes: 1

madflow
madflow

Reputation: 8490

print "<a href=\"$this->link\" target=\"_blank\">";

Upvotes: 4

Related Questions