rendered paste body if ($line == 'Creatures') $allowed = $line_num + 50; if ($line == 'Your Auctions') $notallowed = $line_num + 10; foreach ($this->creatures as $critter => $details) { if (ereg("$critter ",$line) && $line_num > $allowed && $line_num > $notallowed) { echo "<br />" . $critter . " - {$no}<br />"; print_r($details); // Found this creature :D $crit = explode($critter . ' ',$line); $no = $crit[1]; $no = explode(' ',$no); $no = $no[0]; $attack = (($details['att']*($details['boost']+1)) ^2) * $no; $defence = (($details['def']*($details['boost']+1)) ^2) * 1.4 * $no; $table = "<tr><td>{$critter}</td><td>{$no}</td><td>{$attack}</td><td>{$defence}</td></tr>"; } }