PHP: Export DB Table to CSV FILE

I’ve got a custom table in WordPress and I’d like to be able to export the data in that table as a FILE in CSV (semi-colon seperated) format.

I’ve got the data coming out properly, but how do I then save it as an attachment?

Read More

Keep in mind that when using WordPress, headers have already been set… and I really don’t know how to get around that.

Related posts

Leave a Reply

3 comments

  1. For these plugins, they use database to store row & column details. You have to extract the data in MySQL database tables ( those table names are usually named after the plugin’s name ) .

    If you are still not sure how to do, you can just copy the table being displayed in page in browser, then paste in Excel. Last, save as CSV or XLS if you like.