My foreach loop isn't displaying the values that match the keys they belong to .. I'm looping through this foreach loop to retrieve the names and images of my twitter followers and it's not displaying the values , I'm pretty sure the key names are correct .. Because when I just use the $value variable , it will echo both the name and image links are the same time but I want to catch the image link , put it in the img src html format to display the images .. Below is my code.
for ($i=0; $i <= count($array); $i++) {
if (is_array($array[$i])) {
foreach($array[$i] as $key => $value) {
if ($key =='name' || $key =='profile_image_url') {
echo "<b>". $key["name"]."</b><br />";
echo "<img src='".$key['profile_image_url']."' width='100' height='100'/>";
} else {
unset($key);
}
}
}
}