Jump to content

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE.................


Recommended Posts


| Name: {$u} |

ID: {$ir['userid']} |

Rank: {$ir['level']} |

if($ir['hp'] < 50)


print "{$hpperc}%";


else if ($ir['hp'] > 50)


print "{$hpperc}%";


Cash: {$fm} |

Crystals: {$ir['crystals']} |

Loc: Coming Soon! |



Logout |



i added the bit in red to header.php, so if u have under 50 health it would shot up in red if you had over if would show green, but it says:

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/imgame/public_html/header.php on line 105

Can Anyone Help

Link to comment
Share on other sites

Re: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE.............

I'm assuming it would be something like this...


<TD><h5><center>[b]<font color=333333>|</font> <font color=white>Name:</font> [url=""]<font color=orange>{$u}</font>[/url]  <font color=333333>|</font>
<font color=white>ID:</font>  <font color=grey>{$ir['userid']}</font> <font color=333333>|</font>
<font color=white>Rank:</font> [url='criminal.php']<font color=99CCFF>{$ir['level']}</font>[/url] <font color=333333>|</font>";

if($ir['hp'] < 50)
echo '<font color=red>'.$hpperc.'%</font>';
elseif ($ir['hp'] > 50)
echo '<font color=green>'.$hpperc.'%</font>';
echo "
<font color=white>Cash:</font> [url='bank.php']<font color=FFCC33>{$fm}</font>[/url] <font color=333333>|</font>
<font color=white>Crystals:</font> <font color=gray>{$ir['crystals']}</font> <font color=333333>|</font>
<font color=white>Loc:</font> [url='monorail.php']<font color=0099CC>Coming Soon!</font>[/url] <font color=333333>|</font>
<a href='criminal.php'>{$experc}%
<img src=bargreen.gif width=$experc height=10><img src=barred.gif width=$exopp height=10></a> <font color=333333>|</font>
[url=""]<font color=0066CC>Logout</font>[/url] <font color=333333>|</font>[/b]</center></h5>
Link to comment
Share on other sites

Join the conversation

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

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

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