![]() |
Changing Array Key Values
Well here we go again. :-P Obviously.
At the moment, I've got an array with the values 8, 4 and 2. Of course, accompanied by the keys 0, 1 and 2. Now, since those keys can also address the roundtype, I can enter it as 1, 2 and 3. Which would be far more convenient than sending 1::8, 2::4, 3::2 and exploding it as I go. So, how do I shift somewhat these keys? |
I wouldn't use the index as a value in the equation, purely because indexes must be unique and so when you want the same round value, you'll have to refactor your code. How about something like a multidimensional array? Such as the following...
|
Well, sort of helped I guess.
I can't figure out how to display the brackets though. Currently I've got: PHP Code:
Array ( [0] => 1::16 [1] => 2::8 [2] => 3::4 [3] => 4::2 ) but now how I want it to.How do I now, print out the 4 rounds, which each corresponding number of brackets in that round. It should be displayed somewhat like this: Code:
Round 1 Round 2 Round 3 Round 4Well, it would be a HUGE help you you guys could help me out here. |
// Urgent bump :)
|
// --->Urgent bump? Sorry, but I really need some help with this!
|
Do you mean something like:
PHP Code:
|
Like this?
PHP Code:
|
sketch, I think I love you. That's exacly what I meant! Filling in the values will be done dynamicly, so no problem there! Thanks a lot!
Kalle, thanks for the help as well, although it was not what I meant! Non the less. :-) |
| All times are GMT. The time now is 04:40 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0