|All requests||>||What is the best PHP export mysql tab...||>||Request new recommendation||>||Featured requests||>||No recommendations|
by tata respecia - 6 years ago (2015-08-12)
I want to export MySQL query results to a tab delimited text file using PHP.
1. by Zhao - 6 years ago (2015-08-19) Reply
You may use fputcsv & fgetcsv to complete your task. //php.net/manual/en/function.fputcsv.php //php.net/manual/en/function.fgetcsv.php
I was torn between a simple class that does the work, however it uses the deprecated mysql extension which is going away, or a more robust class with features you didn't request that is current. This is the more robust class, a full database wrapper that can also manage the export of mysql data to csv files. The biggest advantage is that it supports the mysqli extension.