Multi dimensional arrays & arrays as keys
Posted: Fri May 02, 2003 10:19 am
Basic question really.
New to PHP..... Java programmer.
I have a series of nested multi dimentional arrays designed to create a referenced data structure relating to one variable. Because of the nature of the data I have used arrays as the Key and the Value.(similar idea to associating data with vectors or treemaps in Java)
This appears to work very well, however when I try and access the data using foreach(), the array I have used as the Key is not recognised by the parser.
Is what I am trying to achieve possible? Can I use an array as a key to store info, then access it again using foreach?
New to PHP..... Java programmer.
I have a series of nested multi dimentional arrays designed to create a referenced data structure relating to one variable. Because of the nature of the data I have used arrays as the Key and the Value.(similar idea to associating data with vectors or treemaps in Java)
This appears to work very well, however when I try and access the data using foreach(), the array I have used as the Key is not recognised by the parser.
Is what I am trying to achieve possible? Can I use an array as a key to store info, then access it again using foreach?