Quote:
Originally Posted by Chompy
Naw. Using multi-dimensional arrays in this case makes it just alot more complicated since you have to divide the index by two for find the correct number, then plus 1 to find the letter( and by using multi dimensional arrays you can't use the
for(member : array) loop because of indexes being wrong, and you to use an extra variable to count the index), so... Nope. Using multi-dimensional arrays in this case just makes it more complicated then it needs too.
|
What?
PHP Code:
temp.table = { { 1000, "M" }, { 900, "CM" } };
for ( temp.n : temp.table )
{
temp.num = temp.n[0];
temp.letter = temp.n[1];
}
I think you misunderstand the concept of multi-dimensional arrays.