Forum Moderators: coopster

Message Too Old, No Replies

Multi-dimensional array?

         

mcavic

3:07 am on Jun 24, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi,

I'm thinking of creating a large 5-dimensional array to pass data between functions. Can anyone tell me if this syntax is safe? It seems to work in PHP 5, and believe it or not, I think it's the easiest solution.

I don't need to sort it or anything, but I need the keys of the first dimension to stay in the order in which they were written when I use foreach to read them.

$a['foo']['2']['3']['4']['5'] = "hello";

Thanks

mcavic

3:16 am on Jun 24, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I see the memory usage is a bit high, but I can probably handle that.

eelixduppy

9:17 pm on Jun 26, 2006 (gmt 0)



>>>I think it's the easiest solution.
If you elaborate on your situation, maybe there really is an easier solution. ;)