10-24-2003, 03:20 AM | #1 (permalink) |
Huggles, sir?
Location: Seattle
|
[php] multi-dimensional arrays, and you!
I'm working on a photo-gallery-like project right now, and am running into some issues manipulating a multi-dimensional array. First, here's the info that I'm working with:
PHP Code:
The sql wrapper that I use returns an array of an array as the results ( $results[0-254]['column_name'] ), and what I'm currently attempting to do is to select each row, and push each row into a "rows" array, like so: PHP Code:
PHP Code:
__________________
seretogis - sieg heil perfect little dream the kind that hurts the most, forgot how it feels well almost no one to blame always the same, open my eyes wake up in flames |
10-24-2003, 01:48 PM | #2 (permalink) |
Huggles, sir?
Location: Seattle
|
Yeah, it was simple.. The inner for loop was messed up :P
It was: for ( $w=0; $x < $positions; $w++ ) { It needed to be: for ( $w=0; $w < $positions; $w++ ) {
__________________
seretogis - sieg heil perfect little dream the kind that hurts the most, forgot how it feels well almost no one to blame always the same, open my eyes wake up in flames |
10-25-2003, 09:58 AM | #5 (permalink) |
Crazy
Location: Bit Bucket
|
I've done the same once where I had 6 seperate if/else if statements and instead of using '==' to check their value, I had put '=' by accident. Three hours and numerous outbursts later, I finally saw the mistake and fell on my floor laughing...
|
Tags |
arrays, multidimensional, php |
|
|