ich habe ein kleines, wirklich nur kleines problemchen!!!
erstmal der code, der das probelm ausl�st:
Code: Alles auswählen
<?phpS
$getit = "SELECT * FROM `haters` ORDER BY `hits` ASC";
$printit = mysql_query($getit);
while($tmp = mysql_fetch_object($printit))
{
function rankimg()
{
if($tmp->hits < "100")
{
$rank = "rank_0.gif";
}
if($tmp->hits < "300" && $tmp->hits > "101")
{
$rank = "rank_1.gif";
}
if($tmp->hits < "600" && $tmp->hits > "301")
{
$rank = "rank_2.gif";
}
if($tmp->hits < "1200" && $tmp->hits > "601")
{
$rank = "rank_3.gif";
}
if($tmp->hits < "2000" && $tmp->hits > "1201")
{
$rank = "rank_4.gif";
}
if($tmp->hits > "3500")
{
$rank = "rank_5.gif";
}
}
rankimg("
echo("<table width="60%" align="center">");
echo("
<tr>
<td><img src="img/".$rank.""></td>
<td width="50%">".$tmp->username."</td>
<td>".$tmp->hits."</td>
</tr>
");
echo("</table>");
");
}
?>
Code: Alles auswählen
#-----------#--------#--------#
# rankimg # name # hits #
#-----------#--------#--------#
nur gibt mir mein XAMPP nun folgende fehlermeldung aus:
die zeile acht istxampp fehlermeldung hat geschrieben:Fatal error: Cannot redeclare rankimg() (previously declared in C:\Dokumente und Einstellungen\lalelu\Eigene Dateien\xampp-win32-1.4.16\xampp\htdocs\tokio\show\users.php:10) in C:\Dokumente und Einstellungen\lalelu\Eigene Dateien\xampp-win32-1.4.16\xampp\htdocs\tokio\show\users.php on line 8
Code: Alles auswählen
function rankimg()
euer floo[/code]