The following code is an associated array which takes info form a search engine such as url,title and snippet,
$googleArray = array(); 
    $find = array ('http://','https://','www.');                    
    $score = 100;                  
foreach ($all_items as $item)  // 
{   
    $googleArray[str_replace ($find, '', ($item->{'link'}))] = array(         
    'title'=> $item->{'title'},
    'snippet' => $item->{'snippet'},
    'score' => $score--
     );
}
I know want to print this out in html on a webpage, I've tried this code.
foreach ($all_items as $item)
{   
    echo "<href={$googleArray[($item->{'link'})]}>". $googleArray['title'] . "</a> <br>" .        
    $googleArray['link'] . "<br>" . $googleArray['snippet'];
    echo "<br>"; echo "<br>";
} 
These are the errors I'm getting
Notice: Undefined index: http://www.time.com/ 
Notice: Undefined index: title 
Notice: Undefined index: link 
Notice: Undefined index: snippet 
Can anyone see where I'm going wrong
 
    