troyraham Posted July 28, 2013 Share Posted July 28, 2013 How do I export the data from the table that is displayed on the page to a CSV file using the export button next to the dropdown. Quote Link to comment https://forums.phpfreaks.com/topic/280585-export-php-table-data-to-csv/ Share on other sites More sharing options...
denno020 Posted July 28, 2013 Share Posted July 28, 2013 Use the same PHP code that would be looping to create the table, to instead populate an array, and then use file_put_csv to create the csv file. You would then return the link to the new csv file on the server to the browser, so it can be downloaded by the user. Hopefully that'll get you started on the right path. Denno Quote Link to comment https://forums.phpfreaks.com/topic/280585-export-php-table-data-to-csv/#findComment-1442476 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.