setsearchname($name); // submit the search $results = $search->results(); foreach ($results as $res) { $mid = $res->imdbid(); $name = $res->title(); $year = $res->year(); // now do something with these data echo "$mid: $name ($year)
\n"; } ?>