Jump to content

T_STRING error


BIGDOG

Recommended Posts

can someone please tell me the error in the following code?

Parse error: parse error, unexpected T_STRING, expecting ',' or ';'


echo "<td><a href="http://www.xxx.com/cart.php?action=add&item=".$row[product_id].""target="_blank" onMouseOver="window.status='Add To Cart!'; return true;" onMouseOut="window.status=''; return true;" onClick="window.open(this.href,0,'directories=no,location=no,menubar=no,status=no,titlebar=no,toolbar=no,scrollbars=yes,width=700,height=400,top=5,left=5, resizable=yes');return false">Add To Cart!</a></td>\n";
Link to comment
https://forums.phpfreaks.com/topic/4403-t_string-error/
Share on other sites

[!--quoteo(post=352739:date=Mar 7 2006, 10:00 PM:name=BIGDOG)--][div class=\'quotetop\']QUOTE(BIGDOG @ Mar 7 2006, 10:00 PM) [snapback]352739[/snapback][/div][div class=\'quotemain\'][!--quotec--]
can someone please tell me the error in the following code?

Parse error: parse error, unexpected T_STRING, expecting ',' or ';'
echo "<td><a href="http://www.xxx.com/cart.php?action=add&item=".$row[product_id].""target="_blank" onMouseOver="window.status='Add To Cart!'; return true;" onMouseOut="window.status=''; return true;" onClick="window.open(this.href,0,'directories=no,location=no,menubar=no,status=no,titlebar=no,toolbar=no,scrollbars=yes,width=700,height=400,top=5,left=5, resizable=yes');return false">Add To Cart!</a></td>\n";
[/quote]


You have to escape the "s you actually want output.

ie:
echo "<img src=\"image.gif\" alt=\"A Picture\">";
Link to comment
https://forums.phpfreaks.com/topic/4403-t_string-error/#findComment-15285
Share on other sites

[!--quoteo(post=352742:date=Mar 7 2006, 11:07 PM:name=greycap)--][div class=\'quotetop\']QUOTE(greycap @ Mar 7 2006, 11:07 PM) [snapback]352742[/snapback][/div][div class=\'quotemain\'][!--quotec--]
You have to escape the "s you actually want output.

ie:
echo "<img src=\"image.gif\" alt=\"A Picture\">";
[/quote]


Would you mind fixing it for me, I've had a long day and I am staring at this blankly. I need another set of eyes please
Link to comment
https://forums.phpfreaks.com/topic/4403-t_string-error/#findComment-15288
Share on other sites

[code]echo "<td><a href=\"http://www.xxx.com/cart.php?action=add&item=".$row[product_id]."\" target=\"_blank\" onMouseOver=\"window.status='Add To Cart!'; return true;\" onMouseOut=\"window.status=''; return true;\" onClick=\"window.open(this.href, 0, ' directories=no, location=no, menubar=no, status=no, titlebar=no, toolbar=no, scrollbars=yes, width=700, height=400, top=5, left=5, resizable=yes'); return false\">Add To Cart!</a></td>\n";[/code]
Link to comment
https://forums.phpfreaks.com/topic/4403-t_string-error/#findComment-15303
Share on other sites

[!--quoteo(post=352761:date=Mar 8 2006, 12:02 AM:name=wickning1)--][div class=\'quotetop\']QUOTE(wickning1 @ Mar 8 2006, 12:02 AM) [snapback]352761[/snapback][/div][div class=\'quotemain\'][!--quotec--]
[code]echo "<td><a href=\"http://www.xxx.com/cart.php?action=add&item=".$row[product_id]."\" target=\"_blank\" onMouseOver=\"window.status='Add To Cart!'; return true;\" onMouseOut=\"window.status=''; return true;\" onClick=\"window.open(this.href, 0, ' directories=no, location=no, menubar=no, status=no, titlebar=no, toolbar=no, scrollbars=yes, width=700, height=400, top=5, left=5, resizable=yes'); return false\">Add To Cart!</a></td>\n";[/code]
[/quote]


thank very much you i appreciate that
Link to comment
https://forums.phpfreaks.com/topic/4403-t_string-error/#findComment-15316
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.