In the last tutorial we explored the associate of a rate using a single named key.
In this lesson we'll create an array that holds multiple key value pairs known as a multi-dimensional
array a multi-dimensional rate is an array that contains one or more arrays.
First let's look at the following table.
Here we have a student's name followed by the grades.
Each student is received on two tests in our example.
We've stored the data in each row in an array.
The first rate has the name John and his two test scores followed by Bob.
Sen. Ted we have four arrays in total each arrays values can be accessed using its position in the table.
We looked at earlier the value is actually its index number but the table makes things much easier to
understand
taking a look at our first equals statement.
We can see that the value John in array one as an index number of 0 0 John's first test score as an
index number of 0 1 is second test for as an index number of 0 2.
Now let's output Bob and his two test scores Bob has an index number of 1 0 is first grade can be referenced
using index number 1 1 and the second test for 1 2
Sam has an index number of 2 0 Test 1 is 2 1 in test 2 is 2 2 so by now you can probably see the pattern
and you can apply the same concept to output Ted's grades as well.