Multidimensional arrays
Posted: Fri Nov 12, 2010 4:45 am
Hello, I have a, hopefully, small problem. I'm taking my first steps in PHP and I'm trying to work with multidimensional arrays. I have some background in Java.
What I'm trying to do, is read a text file and place the text that matches something predefined. When I would go about creating the multidimensional arrays for this in Java it would go like this:
All I can find when I search the web are these kind of predefined arrays:
Hopefully I'm making myself clear. Any help appreciated.
Thanks
What I'm trying to do, is read a text file and place the text that matches something predefined. When I would go about creating the multidimensional arrays for this in Java it would go like this:
Code: Select all
int[][][] MultiArray = new int[3][6][3]Code: Select all
$a = array( 'color' => 'red',
'taste' => 'sweet',
'shape' => 'round',
'name' => 'apple',
4 // key will be 0
);Thanks