Report to array

Source: Internet
Author: User
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 '))
)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.