Open New Window _Blank

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
dave7802
Forum Newbie
Posts: 13
Joined: Wed Nov 12, 2008 3:49 pm

Open New Window _Blank

Post by dave7802 »

Hello,

Quick Question if someone can help

Code: Select all

        echo "</td><td align='left'><a href='http://bfbcs.com/stats_ps3/". $player['name']."'> ";
How the hell does the target=_blank work in this situation,

I have had a quick go with Javascript, but am unable to edit this correctly to get the target="_blank"
To Operate Correctly

Thanks
TheBrandon
Forum Commoner
Posts: 87
Joined: Tue May 20, 2008 8:55 am

Re: Open New Window _Blank

Post by TheBrandon »

Code: Select all

echo '</td><td align="left"><a href="http://bfbcs.com/stats_ps3/'.$player['name'].'" target="_blank">';
Try that.
dave7802
Forum Newbie
Posts: 13
Joined: Wed Nov 12, 2008 3:49 pm

Re: Open New Window _Blank

Post by dave7802 »

Thank you very much

Looking at my attempt, it was a Very stupid error!!

Code: Select all

echo '</td><td align="left"><a href="http://bfbcs.com/stats_ps3/'.$player['name']."' target="_blank">';
I got my " and ' the wrong way around!

Thanks :-) lol
TheBrandon
Forum Commoner
Posts: 87
Joined: Tue May 20, 2008 8:55 am

Re: Open New Window _Blank

Post by TheBrandon »

No problem. I still make that mistake all the time. I find it's easier to always use ' with echo statements because it helps keep the HTML syntax (which mainly uses ") separate.
User avatar
Jonah Bron
DevNet Master
Posts: 2764
Joined: Thu Mar 15, 2007 6:28 pm
Location: Redding, California

Re: Open New Window _Blank

Post by Jonah Bron »

Plus single quotes are faster :mrgreen:
Post Reply