$query=$db->query_read("SELECT * FROM " . TABLE_PREFIX . "mytable ORDER BY `uid` DESC LIMIT " . ($limitlower - 1) . ", $perpage"); while ($result = $db->fetch_array($query)) { $row_id=$result['uid']; $row_name=$result['name']; foreach ($result as $key => $value) { eval('$maindata .= "' . fetch_template('loopy_template') . '";'); }}