here u go
Code:
<?
if (eregi("block-Cheats.php", $_SERVER['PHP_SELF'])) {
Header("Location: index.php");
die();
}
global $prefix, $db;
include("modules/Cheats/config.php");
$sql = "SELECT * FROM '".$prefix."'_cheats DESC";
$result = $db->ql_query($sql);
$row = $db->sql_fetchrowset($result);
$count = count($row);
$content = "".$count." Latest Cheats
";
for ($i = 0; $i < count($row); $i++)
{
$cname = $row[$i]['cheat_game'];
$cheat = $row[$i]['cheat_cheat'];
$cheat = "$cheat[0]$cheat[1]$cheat[2]$cheat[3]$cheat[4]";
$content .= "$cheat - $cname
";
}
$content .= "We have $count cheats";
?>
haven't test it but i think it will work.
btw y do u want to include the cheats config? i don't see any use of it in this block.
edit, now i see it better the
Code:
$cheat = $row[$i]['cheat_cheat'];
$cheat = "$cheat[0]$cheat[1]$cheat[2]$cheat[3]$cheat[4]";
won't work cause i see that u want the $chat to be an array but since i don't see the result of it i can make sure i will work. Maybe u should post an example of what you want to print?