The following table year & nbsp; person & nbsp; Course & nbsp; content 2011 & nbsp; Xiao Zhang & nbsp; Physical Education & nbsp; Badminton 2011 & nbsp; Xiao Zhang & nbsp; culture course & nbsp; European table conversion array
The following table is available:
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?
------ 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 ('PE-badminton ', 'culture-introduction to Europe '), 'Zhang '=> array ('PE-badminton', 'culture-introduction to Europe '))
)