Table to array has the following table
Year class content
2011 Xiao Zhang physical education class badminton
Introduction to 2011 John's culture course in Europe
2011 Xiao Li physical education class football
Introduction to Xiao Li culture course in Asia 2011
2012 Xiao Zhang swimming in physical education
A brief history of 2012 Xiao Zhang culture courses
2012 Xiao Li physical education class tennis
2012 Xiao Li culture course flower appreciation
The actual table is more complex than this one. There are two year tables and two persons in the preceding table. There are two types of courses. the number of parameters in the first three columns is fixed, and the values in the content are different, that is, you can determine the fourth of the first three parameters. you need to traverse the array $ data = array [2] [2] [2]. can you do it in two dimensions? the complexity of three dimensions is too great, I don't want to enumerate the entire table into an array. Is there any way to simplify it?
Can subscript be a variable?
How can I write this array into a txt file?
Reply to discussion (solution)
$ Arr = array ('000000' => array ('Lil' => array ('physical education-badminton ', 'culture-introduction to Europe '), 'Zhang '=> array ('PE-badminton', 'culture-introduction to Europe ')), '000000' => array ('Lil' => array ('physical education-badminton ', 'culture-introduction to Europe '), 'Zhang '=> array ('PE-badminton', 'culture-introduction to Europe ')))
Thank you for choosing upstairs. could you please try to simplify the values in the array? it is best to be like a [0] [0] [0] = 5, a [0] [0] [1] = 6, a [0] [0] [2] = 8... a [3] [6] [5] = 3. a table has a total of 90 different numbers, all of which are matched by subscripts. Is there a way to traverse the table with 3*6*5, you don't need enumeration.
Generally, how many dimensions is used for such a table? The two dimensions are the clearest, but they keep repeating. There are 90 rows of 90 data records, which is huge.
Also, is the title, such as name, not usable? can I set a big label as a variable to traverse the array?