$data = str_replace(array('<script>', '</script>', 'var '), '', $data);
$array_results = explode(";", $data);
if (is_array($array_results)) {
$stats_data = array();
foreach ($array_results as $key => $value) {
if (!$value) {
continue;
}
$_temp = explode(" = ", $value);
$result_data[$_temp[0]] = str_replace(';', '', $_temp[1]);
}
}