Let\'s say I have a database.... is there a way I can export what I have from the database to a CSV file (and text file [if possible]) via PHP?
Just like @Dampes8N said:
$result = mysql_query($sql,$conecction); $fp = fopen('file.csv', 'w'); while($row = mysql_fetch_assoc($result)){ fputcsv($fp, $row); } fclose($fp);
Hope this helps.