prepare( "SELECT id_company, name, description FROM company"); $stmt_file->execute(); $rows = $stmt_file->fetchAll(PDO::FETCH_ASSOC); echo json_encode($rows, JSON_PRETTY_PRINT); ?>