Jump to content

Dont understand error [CI]


whiteboikyle

Recommended Posts

<?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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.