PHP Mysqli select to csv |
PHP Mysqli select to csv |
nuddernuby |
Aug 27 2015, 04:16 AM
Post
#1
|
Group: Members Posts: 3 Joined: 27-August 15 Member No.: 23,453 |
Could someone save me from insanity and provide a working script for the following simple problem, please. (I've tried many and failed)
I have a table 'projects' with field 'projectname', currently populated with five records, say A,B,C,D & E. I need to store an the array of these records in this format: $arr=("A","B","C","D","E") or output it to a csv string in csv file. I can echo the results but fail to get this into the required format/file. Basic query is: $query=mysqli_query($conn,"SELECT projectname FROM projects"); What then? Apologies for the simplicity of the problem. |
Lo-Fi Version | Time is now: 18th April 2024 - 01:59 AM |