# Need help with PHP code

**URL:** <https://forum.pinegrow.com/t/need-help-with-php-code/3942>\
**Category:** General\
**Created:** [April 9, 2020, 5:20pm UTC](https://forum.pinegrow.com/t/need-help-with-php-code/3942 "2020-04-09T17:20:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![randyrie](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/randyrie/32/2103_2.png) [@randyrie](https://forum.pinegrow.com/u/randyrie)\
**Post date:** [April 9, 2020, 5:20pm UTC](https://forum.pinegrow.com/t/need-help-with-php-code/3942/1 "2020-04-09T17:20:16Z")

</div>

I use a PHP code block that successfully displays and links to all the PDFs stored in a folder… I want to have the PDFs display in a new window when clicked on.

Here is a part of the code where I think the “target” should be inserted:

print("

\<a href="…/docs/bulletins/current/$dirArray\_ch[$index]"\>$dirArray\_ch[$index]");  
print("\n");

Can anyone tell me where I can insert the target="\_blank" code to make this work?  
(I can supply the entire code block if necessary.)

---

<div class="post-metadata">

**Author:** ![droidgoo](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/droidgoo/32/2209_2.png) [@droidgoo](https://forum.pinegrow.com/u/droidgoo)\
**Post date:** [April 9, 2020, 10:02pm UTC](https://forum.pinegrow.com/t/need-help-with-php-code/3942/2 "2020-04-09T22:02:15Z")

</div>

this link opens in a new window

`<a href='http://www.law.cornell.edu/supct/html/91-339.ZPC.html' target="_blank" rel="noopener">Justice Rehnquist</a>`

but i think you could put it just ahead of the href and it would still work, i would also throw in the noopener attribute as well.
