Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP] Błąd przy wyświetlaniu strony, Parse error: syntax error, unexpected '='
Kubik213
post 27.04.2009, 19:06:14
Post #1





Grupa: Zarejestrowani
Postów: 8
Pomógł: 0
Dołączył: 25.04.2009

Ostrzeżenie: (0%)
-----


Witam, pomóżcie:
Kawałek kodu, w którym jest błąd:

Cytat
Parse error: syntax error, unexpected '=' [...] on line 124


Cytat
<?
$limit = 1;
function coloured_value($valuein)
{
$value2 = $valuein;
while(strlen($value2) > 3)
{
$value .= '.'.substr($value2, -3, 3);
$value2 = substr($value2, 0, strlen($value2)-3);
}
$value = $value2.$value;
if($valuein > 0)
return '<font color="green">+'.$value.'</font>';
elseif($valuein < 0)
return '<font color="red">-'.$value.'</font>';
else
return ''.$value.'';

}
if(empty($type))
$players = $SQL->query(' SELECT * FROM players ORDER BY `players`.`experience`-`players`.`exphist_lastexp` DESC LIMIT '.$limit)->fetchAll();
foreach($players as $player)
{

print"
<table border=\"1\" style=\"width:80%;\" class=\"barabara\"><tr>
<td><a href="?subtopic=characters&name='.urlencode($player['name']).'"><font color="red" size="1"><b>'.$player['name'].'</font></b></a><br /><font

color="#CCFF99" size="1">'.$player['level'].' '.$config_vocations[$player['vocation']].'</font></td>
<td align="right"><font color="#CCFF99" size="1">'.coloured_value($player['experience'] - $player['exphist_lastexp']).'</font></tr></td>
</td></table>
";

}
?>


124 linijka to: <table border=\"1\" style=\"width:80%;\" class=\"barabara\"><tr>
Go to the top of the page
+Quote Post

Posty w temacie


Closed TopicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 19.07.2025 - 18:20