i'd like to get more than one result using the fuction mentioned in the title, so far i'm just able to get just an only value using preg_match. I'd like to get an array of all the results and then record them in my db.
That's my current code:
$casturl = "https://www.themoviedb.org/movie/353491-the-dark-tower/cast";
$cast = file_get_contents($casturl);
preg_match_all('|<img class="profile lazyload fade" data-sizes="auto" data-src="(.*?)" data-srcset="|' , $cast , $castimg );
print_r($castimg);
When i print the results i'm just giving: Array ( [0] => Array ( [0] =>
I made sure cast contains what i want. I've tried already a lot of possibilities and i got nothing :(