I'm pretty new to php coding so take it easy on me!

I trying to use the snoopy class to return a list of links from a test page.

Here's my code:

include "Snoopy.class.inc";
    $snoopy = new Snoopy;
    $snoopy->expandlinks = true;


$snoopy->fetchlinks("http://www.eracefans.com/snoopy/test.html");

$data = $snoopy->results;

foreach($data as $key => $val) 
{ 
echo $key.' -> '.$val.'<br>'; 
}

The problem I am having is that it is only returning the LAST link instead of returning ALL of the links.

What am I doing wrong?

    Mucho thanks.

    That made it work.

      Write a Reply...