Zurev Posted January 3, 2011 Share Posted January 3, 2011 http://content.screencast.com/users/DeviousDan/folders/Jing/media/a563187c-93fe-4ec7-b496-41e50554b639/2011-01-02_2220.png As you can see, I print_r the results array and it has a key of aim, I then try to access the aim value on line 44 and as you can see, it's an undefined Index. I've officially forgotten all basics of PHP, any fresh eyes wanna give some insight? Thanks. Quote Link to comment Share on other sites More sharing options...
Anti-Moronic Posted January 3, 2011 Share Posted January 3, 2011 It's because actual location is here: $results[0]['aim']; Quote Link to comment Share on other sites More sharing options...
Zurev Posted January 3, 2011 Author Share Posted January 3, 2011 It's because actual location is here: $results[0]['aim']; /mostupsetfacepalmever Thanks. Quote Link to comment Share on other sites More sharing options...
Anti-Moronic Posted January 3, 2011 Share Posted January 3, 2011 It's because actual location is here: $results[0]['aim']; /mostupsetfacepalmever Thanks. Don't worry, done it many times. Just take a close look at the print_r result (or var_dump() which is better) and you will see the two arrays with specified indexes. This was simple but I'm sure you'll come up against a hugely ridiculous and complex array some other time. In those instances, analyzing the actual structure is key. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.