line 41: replace $row with $row['Cells']
Multi-Dimensional Arrays Help - And Other Questions on Arrays
Collapse
X
-
Your good Mr. Dormilich! :) You too Ciary.. This is exactly what I mean when I say that you have to really understand HOW arrays work before you can even troubleshoot them. I think that has always been my frustration. I looked at the code over half a dozen times and didn't see that. Now, it is so plain..Comment
-
i must say, it was because i missed an "array(" so gigantic arrays can even trouble the best coders (i'm not one of them). biggest problem with someone elses code is you might see problems differently. thats why its very difficult to find your own errors.Comment
-
I know what you mean Ciary.. I have a hard time finding my own errors some times too. In fact... some of the absolute hardest errors for me have been array errors. I can usually find out whats going on but when I cannot get the correct result set, I wind up like a dog chasing his tail. That's why I am here today. I figured that I had better get down to business and start asking some serious questions. It's kinda like a doctor that can successfully preform an operation on your brain but doesn't know how to remove a wart. :)Comment
-
Thanks.. As for me.. its 6:30 am and I haven't been to sleep yet. Now you can see why my wife hates me. :) I spend all night coding. Since I have started programming, coffee and sleepless nights have become my best friend.Comment
-
lol... Wow.. I never posted so many times in a forum in my life. I think my record was 30 something and that was also on this forum. This one is the record though.
Ok, I am going to try and sleep for a little while. A sincere thanks to both of you guys! I am also putting the both of you on my forum buddy list. :)Comment
-
Daddy, look! NO HANDS! :P~
For any other poor soul having a hard time with arrays, look at it like this..Code:$colors = array ( array ( 'black' => 'sky', 'blue' => 'ocean', 'pink' => 'san francisco' ) ); echo $colors['0']['blue'];
Yields Ocean. ;)Code:$colors['0']['blue']; foreach--------^ key-^----^ value
Now kiddies.. when all I need is a single value, instead of using a foreach loop and typing 3 extra lines, I can just type one by using this. ;)
I still may not understand Atli's monster 7D array but I am sure well on my way. Now when I get an undefined index notice, it actually MEANS something to me.
As elementary as arrays may seem to most, I honestly struggled with them but I really feel like I have a much better handle on what is happening and what to do to troubleshoot one and so, I have achieved my goal here thanks to Dormilich, Ciary and Markus.Comment
Comment