-1

I search about open in new windows with PHP code , but I don't know how to adapt the code:

1)

<a href="<?php echo $value['link'] ?>" class="btn btn-primary btn-large appico-content-more"><?php echo $value['readmore']

2)

if(isset($value['showlink']) and $value['showlink']=='yes' ) echo '<a href="' . $value['link'] . '">';

I need that link open in new windows.

halfer
  • 19,824
  • 17
  • 99
  • 186

2 Answers2

2
<a href="link" target="_blank">link</a>

set target="_blank"

Evadecaptcha
  • 1,403
  • 11
  • 17
0

add target="_blank" to the a tag.

<a href="<?php echo $value['link'] ?>" class="btn btn-primary btn-large appico-content-more" target="_blank">

and

if(isset($value['showlink']) and $value['showlink']=='yes' ) echo '<a href="' . $value['link'] . '" target="_blank">';
castis
  • 8,154
  • 4
  • 41
  • 63