• PHP Help
  • How to put Target Blank in a PHP echo statement

Hello, im trying to make the links echoed out in this echo code to open in a new browser tab, These links show inside a iframe and when link is clicked on i want it out of the iframe and in a new browser tab, any help on this would be great.
echo '<p><img src="'.$filepath.'"><strong><a href='.$link.'" title="'.$title.'">'.$title.'</a></strong><br />';

How would target="_blank" be put in the above code.

I did try this code in the iframe html page but i did not work,
<head>
<base target="_blank">
</head>

    echo '<p><img src="'.$filepath.'"><strong><a href='.$link.'" title="'.$title.'" target="_blank">'.$title.'</a></strong><br />';
    

    PS: You could save yourself some typing by using single quotes within the HTML tags while double quotes for the entire PHP string, e.g.:

    echo "<p><img src='$filepath'><strong><a href='$link' title='$title' target='_blank'>$title</a></strong><br />";
    

      Thanks for the feed back, I had tried this code and it worked

      echo '<p><img src="'.$filepath.'"><strong><a href='.$link.'" target=\"_blank\"title="'.$title.'"'.$title.'</a></strong><br />';

        Write a Reply...