javascript - JS to PHP Foreach Array -
through curl can extract data site in js.
here code in php,
$content = 'var locations = ["https:\/\/website.to\/embed-h7jg2gopxi0k.html","https:\/\/website1.to\/embed-v3ywuokxeirq-580x326.html","https:\/\/website3.to\/embed-dzl49jlbx1lw.html","https:\/\/website2.to\/embed-hovrbjkng4cm.html];';
how can convert php , foreach links 1 one.
if (preg_match('/\[(.*)\]/s', $content, $match)) { // array part $string = str_replace(array('"', '\\'), "", $match[1]); // remove " , escapes - \ $your_desired_array = explode(',', $string); // explode string on , } print_r($your_desired_array);
Comments
Post a Comment