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
dave7802
Forum Newbie
Posts: 13 Joined: Wed Nov 12, 2008 3:49 pm
Post
by dave7802 » Wed Apr 28, 2010 10:52 am
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
Post
by TheBrandon » Wed Apr 28, 2010 11:07 am
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
Post
by dave7802 » Wed Apr 28, 2010 11:17 am
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
Post
by TheBrandon » Wed Apr 28, 2010 12:03 pm
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.
Jonah Bron
DevNet Master
Posts: 2764 Joined: Thu Mar 15, 2007 6:28 pm
Location: Redding, California
Post
by Jonah Bron » Wed Apr 28, 2010 4:05 pm
Plus single quotes are
faster