All keys of array values ββat [0] with simple html dom
I am trying to create a Mirror site for Anime
file_get_contents($page);
$html->load_file($page);
$links = array();
foreach($html->find('iframe') as $element)
{
$links[] = $element;
}
foreach ($links as $out)
{
$links = preg_match('/(http:\/\/mp4upload.com).+?(html)/', $out, $matches);
unset($matches[1]);
unset($matches[2]);
if($matches){
$mirror_link = $matches[0];
This is my current code, but every time I load it
The array is displayed as follows
Array ( [0] => LINK )
Array ( [0] => LINK )
Array ( [0] => LINK )
Array ( [0] => LINK )
Is it possible to limit this to only 1 link and remove the rest?
+3
source to share
1 answer