whiteboikyle Posted August 8, 2011 Share Posted August 8, 2011 <?php foreach($query->result() as $row): ?> <div id="userFriends"> <?php $userID = $row['userIDFriend']; $this->db->where('ID', $userID); $querys = $this->db->get('user'); $rows = $querys->row_array(); echo ($rows['Name']); ?> </div> <?php endforeach; ?> Fatal error: Cannot use object of type stdClass as array in /home/whitey/public_html/application/views/userfriends.php on line 5 line 5 is the $userID = $row['userIDFriend']; Link to comment https://forums.phpfreaks.com/topic/244181-dont-understand-error-ci/ Share on other sites More sharing options...
whiteboikyle Posted August 8, 2011 Author Share Posted August 8, 2011 NVM lol $row->userIDFriend Link to comment https://forums.phpfreaks.com/topic/244181-dont-understand-error-ci/#findComment-1254016 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.