Getting results like "https://bmovies.to/"a class="
but I want https://bmovies.to/movie_title?
Here is my code
foreach($html->find('a[class=name]') as $head)
{
$head->href;
$pre = 'https://bmovies.to/';
$movie=$pre.$head;
echo '<a href="'.$pre.$head.'</a>';
$count++;
}
Like what @Bytewave said you're missing a character on your anchor from this line
echo '<a href="'.$pre.$head.'</a>';
Make a correction for your link and put some text inside of your anchor tag as below.
echo '<a href="'.$pre.$head.'">some-text-here</a>';