if ($q = sql_showbase()) { while ($t = sql_fetch($q)) { $table = array_shift($t); // ... }