I am trying ti get value from javascript
$tt = '<script type="text/javascript">tabCls.push(
new pageModelTab(
"tabSpecifications"
, "/cusa/includeFile.action?productOverviewCid=0901e02480f8c511&componentCid=0901e024800bef11&userSelectedModel=0901e02480f8c511"
, "Specifications"
, 7
, false
, ""
, null
, true
, null
)
);
function onClick_tabSpecifications() {
try {
var location = new String(window.location);
if (location && location.indexOf("?selectedName") != -1) {
return true;
}
new TabState("7").addTabToBrowserHistory();
show("7");
showHideFooterDisclaimer(\'Specifications\');
return false;
} catch (e) {
//alert(e.message);
return true;
}
}
</script>';
function matchin($input, $start, $end){
$in = array('/');
$out = array('\/');
$startCh = str_replace($in,$out, $start);
$endCh = str_replace($in,$out, $end);
preg_match('/(?<='.$startCh.').*?(?='.$endCh.')/', $input, $result);
return array($result[0]);
}
$matchin = matchin($tt,'tabSpecifications','Specifications');
echo $matchin[0];
I need value between tabSpecifications and Specifications
But i am getting error Notice: Undefined offset: 0 please help