_blank is used for html so is there a code on how to open a new window using php?

_blank is used for html so is there a code on how to open a new window using php?

No. PHP is not ever directly processed by the browser so there is no way to do that. However, this might also be relevant: http://www.smashingmagazine.com/2008/07/01/should-links-open-in-new-windows/

Unrecommendlingly (yes I just made that word up.)

ahh ok, thanks @TomB and @RyanReese for your reply :slight_smile:

I’m on the fence on this one, I think for tech websites getting a new window is good. I don’t like websites that are based on technology that don’t open a new window (Sorry Sitepointe), for people who visit these sites are generally tech savoy enough to know what is going on. On the other hand for a website catering to the general public I can see where it would be better leave the current website.

Fortunately as long as sites don’t restrict you by adding _blank you can choose for yourself how links open. Where no restriction is in place you can simply right click a link and select new tab or new window or to replace the current page. As soon as a page starts to try to force a particular outcome those people who don’t know how to override it can lose their preferred option.

I have my browser set to open same site in same tab and new site in new tab regardless of any attempt by the individual sites to try to dictate differently.

My browser, my choice - that’s why _blank was declared obsolete 18 years ago.

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.