symfony can’t export csv with date time data

Can’t export file to CSV when have this line $row->getcreateAt()

$response = new StreamedResponse();
            function () use ($results) {
                $handle = fopen('php://output', 'w+');
                foreach ($results as $row) {
                    //array list fields you need to export
                    $data = [
                    fputcsv($handle, $data);

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *