The main question in this tread is really asking the question: “Why do I have no control of a multidimensional array.”
The code above is reading a comma-delimited text file that contains 39 rows and two columns. If you run the link you’ll see the basic shape in the table output. That table is created while the file is read into the array. Its format however will not do. The objective is to load the array then write a table that presents 10 rows of 8 columns or 5 rows of 16 columns, whichever I like. Creating the table should be easy enough once I can successfully display the variables loaded from the file.
What you see by running the link is successful array load with table output, but once the array is loaded even a simply print statement baulks at displaying the variables. There is something fundamental about using a multi-dim array I don’t understand in PHP. I’m hoping you guys can point me to the lack of understanding.
I’m green to arrays in PHP, but I’ve been working with them 20 or 30 years in Basic and I shouldn’t have such an easy stumble on the issue.
I’ve got to get a handle on these arrays because there are many different tables I need to create, with much, much more data to display.
Thanks.