![]() |
3 Dimensional Array
Hey guys,
I've been trying to figure out something for quite some time now. Decided to give it a try. PHP Code:
What do I want to do? We have 2 arrays in an array. The one exports ReSpawN's stats, and the other exports b03tz's. In $global, I've pushed $respawn row results and $b03tz row results. Now the question is, how do I make them show up in a list like so: echo $global[$respawn[1]]; or something like that. It's completely new to me so I haven't got a clue what to do. I also want to GENERATE the difference. When my level of, lets say, a building, is higher than that of b03tz, it shows the difference. For example: ReSpawN 1 b03tz 0 Difference 1 Mine of course, is green, and b03tz's is red. Can one of you guys help me out here? :-) Mark |
Hi Mark,
I'm afraid I don't fully understand what you are trying to do, but I've taken a guess based on your thread title :D At the moment, your current code would make your $globals array look something like this: PHP Code:
PHP Code:
PHP Code:
To access the values in this array you would use something like: PHP Code:
Alan |
Then again ^ thats just a two dimentional array. To be honest only reason I could see a 3 dimentional array being used is because you are doing something with levels and maps ie:
$game['level_1']['map1']['map_peice1'] = 1; $game['level_1']['map1']['map_peice2'] = 1; So maybe 3 dimentional arrays are not what he means possibly what you said is what hes looking for :). |
| All times are GMT. The time now is 11:18 PM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0