Jump to content

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING


Recommended Posts

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in F:\Program Files\Apache Group\Apache2\htdocs\ministarsnetwork2\designs\screws.inc.php on line 54

[size=8pt][color=black]52[/color][color=purple]$menu2[/color] [color=blue]= "<P align=left>
[color=black]53[/color]<img name=phone_item_equip_flat src=phone_item_equip_flat.png width=110 height=47 border=0 usemap=#m_phone_item_equip_flat alt=""><map name=m_phone_item_equip_flat>
[color=black]54[/color]<area shape=poly coords=80,27,81,22,84,17,89,14,95,12,101,14,106,17,109,22,110,27,109,33,106,38,101,41,95,43,89,41,84,38,81,33,80,27,80,27 href=javascript:; alt="" >
[color=black]55[/color]<area shape=poly coords=39,27,40,20,44,15,49,11,55,10,62,11,67,15,71,20,72,27,71,33,67,39,62,42,55,43,49,42,44,39,40,33,39,27,39,27 href=javascript:; alt="" >
[color=black]56[/color]<area shape=poly coords=-1,27,0,21,4,16,9,13,15,12,21,13,26,16,30,21,31,27,30,34,26,39,21,42,15,43,9,42,4,39,0,34,-1,27,-1,27 href=javascript:; alt="" >
[color=black]57[/color]</map></P>";[/color][/size]

Would love some help.  :)
Joe's response tells you why you got the error - and how to avoid them in future.

The quick solution to the specific problem you posted would be to change alt="" to alt= '' in each case, i.e. change those " to ' and they won't 'clash' with the " you used to delimit what you wanted echo'd.
I would suggest you use HEREDOC if you have alot of HTML like so:
[code=php:0]$menu = <<<HTML
<P align="left">
<img name="phone_item_equip_flat" src="phone_item_equip_flat.png" width="110" height="47" border="0" usemap="#m_phone_item_equip_flat" alt=""><map name="m_phone_item_equip_flat">
<area shape="poly" coords="80,27,81,22,84,17,89,14,95,12,101,14,106,17,109,22,110,27,109,33,106,38,101,41,95,43,89,41,84,38,81,33,80,27,80,27" href="javascript:void;" alt="" >
<area shape="poly" coords="39,27,40,20,44,15,49,11,55,10,62,11,67,15,71,20,72,27,71,33,67,39,62,42,55,43,49,42,44,39,40,33,39,27,39,27" href="javascript:void;" alt="" >
<area shape="poly" coords="-1,27,0,21,4,16,9,13,15,12,21,13,26,16,30,21,31,27,30,34,26,39,21,42,15,43,9,42,4,39,0,34,-1,27,-1,27" href="javascript:void;" alt="" >
</map></P>
HTML;
// dont indend the line above !![/code]
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.