-CrAzY- Posted August 15, 2007 Posted August 15, 2007 | 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! | {$experc}% | 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 Quote
Decepti0n Posted August 15, 2007 Posted August 15, 2007 Re: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE................. You put it inside a string Quote
Matty Posted August 16, 2007 Posted August 16, 2007 Re: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE............. I'm assuming it would be something like this... <TR> <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> </TD> </TR> </TABLE> Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.