query("SHOW TABLES LIKE '%ipd%'"); while ($r = $res->fetch_array()) { echo $r[0] . "\n"; } $db->close();