Demo: Search collection

Type a collection name in the form below to test the code to search a collection:

$tmdb      = Factory::create()->getTmdb('your_api_key');
$search    = new Search($tmdb);
$responses = $search->collection('Alien');

foreach ($responses as $response)
{
    echo '<li><b>Name:</b> '.$response->getName();
        echo '<ul>';
        echo '<li><b>Id:</b> '.$response->getId().'</li>';
        echo '<li><b>Poster path:</b> '.$response->getPosterPath().'</li>';
        echo '<li><b>Backdrop path:</b> '.$response->getBackdropPath().'</li>';
        echo '</ul>';
    echo '</li>';
}

See Results\Collection reference page for availables methods.

Result