jonaofarc Posted November 24, 2008 Share Posted November 24, 2008 in an array that looks like this Array ( [0] => Array ( [user_friend_id] => 9 ) [1] => Array ( [user_friend_id] => 12 ) how do I retrieve the user_friend_id so that I can $friends = $this->mBoCatalog->friends($user,$this->mPageNo, $this->mrTotalPages); print_r($friends); foreach ($friends as $k => $value) { echo $k; } right now $k = the array unique id and $value = nothing .... I would like value to output the user_friend_id only Link to comment https://forums.phpfreaks.com/topic/134099-in-an-array-that-looks-like-this-array-0-array-user_friend_id-9/ Share on other sites More sharing options...
rhodesa Posted November 24, 2008 Share Posted November 24, 2008 foreach ($friends as $value) { echo $value['user_friend_id']; } Link to comment https://forums.phpfreaks.com/topic/134099-in-an-array-that-looks-like-this-array-0-array-user_friend_id-9/#findComment-698039 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.