query("SELECT * FROM files WHERE parent=" . $file_id . " AND owner=" . $owner . ";"); $count=0; while($row = $content_db->fetchArray(SQLITE3_NUM)){ $content[$count][0] = $row[0]; $content[$count][1] = $row[1]; $content[$count][2] = $row[2]; $content[$count][3] = $row[3]; $content[$count][4] = $row[4]; $content[$count][5] = $row[5]; $content[$count][6] = $row[6]; $content[$count][7] = $row[7]; $content[$count][8] = $row[8]; $count++; } /* var_dump($content); exit; if($content[0][4] == "FILE"){ if(!start_file_download($username, $folder_path)){ echo "False!"; exit; return false; } else { echo "True!"; exit; return true; } } */ if(!empty($content)){ return $content; // returns everything listed in the folder which is commited as parameter } else { return false; // empty folder } }