I read how to use function preg_match in http://php.net/manual/en/function.preg-match.php, I don't know what is differerent between using $subject and substr($subject,3) in preg_match($pattern, $subject, $matches, PREG_OFFSET_CAPTURE, 3) and preg_match($pattern, substr($subject,3), $matches, PREG_OFFSET_CAPTURE). Please help me understand and check below function that why does it return empty array?
<?php
$ch=curl_init();
curl_setopt($ch,CURLOPT_URL,"http://www.1gom.us/ti-le-keo-malaysia.html");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$content = curl_exec($ch);
curl_close($ch);
$regex = '/<div class="tabbox" id="tabbox">(.*)<\/div>/';
preg_match($regex, $content, $matches, PREG_OFFSET_CAPTURE, 3);
$table = $matches[1];
print_r($table);
?>