PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Well, I looked over the sample and I don't see anything strange about it. We need to add a little to the foreach. I haven't tested this so you will need to play around with it but try this.
I don't get error messages unless I put a string where an array should be within the foreach loop. What happens is the csv file is generated, but it's blank. So I need to sort out a way of printing out each line of the array. If that makes sense?
Hmm, I thought it was an issue with the foreach printing the arrays.
In any case I still need the error but, if you can get the data to the browser then you're done.
In the "browser" view you must be printing or echoing the data just put that data in an array like
Yeah that's my issue. When I try the foreach array within the csv generation script the result is the csv is blank. I need a script that will generate a csv using the html table data.
I don't understand, why parse the html to build an array to put in a csv file when you have the raw data and you can put it in an array directly and write that to a csv file? The html has nothing to do with the csv file.
The html table side of things was prewritten by the gapi team and I know its completely optional. It's there purely for me to try and illustrate what I need in a csv file. So yes, all I am trying to do is print the contents of the array to a csv.
If the array is empty then the foreach is not working, you said it was and that you could print the data out to the browser.
You need to work it back start by printing $csvarray if its empty then print $ga then make one loop and print that data and so on...
I'm sure you have everything you need to make it work but you will need to go step by step.
Yep, its a bummer. The only way I can do more is if I can recreate the issue on my system and to do that I will need everything you have involving this code. Other then that I don't know where to point you because I only have fragments of info.