# get all .dbi files in a directory
$databases_list = glob("directory/*.dbi");
# looping it
foreach ($databases_list as $db_name){
# sanitizing name of file
$db_name = str_replace('directory/','',str_replace('.dbi','',$db_name));
# Database connection
$db = new SQLite3($db_name);
$result = $db->query("SELECT * FROM your_table_name");
while($data = $result->fetchArray()){
echo $data['column']."<hr>";
}
}