PHP
2
Вклад в тег
$str = preg_replace("/Total rows:(.*)/", "", $str);
$str = explode("\n", $str) ;
unset($str[0]);
unset($str[1]);
foreach($str as $line){
if(!empty($line)){
list($gn, $imp, $cl, $coast) = explode("\t", $line);
$linearray = array(
"AdGroupName" => $gn,
"Imp" => $imp,
"clicks" => $cl,
"coast" => $coast,
);
print_R($linearray);
}
};
json_decode(json_encode($response), true))