Below is code that scrapes a number. The problem is that, if there's a comma in the number, only the part before the comma is scraped. For instance, 24,365 is 24.
Is there a way to get past the comma and scrape the entire number? I need to use the number without the comma.
//parsing to find out how many results there are
$start= strpos($playcode, "Start Point");
$finish= strpos($playcode, "Finish Point");
$playcode=substr($playcode, $start, $length);
preg_match("/([0-9]+)/",$playcode,$playmatches);
if (count($playmatches)>0) {
$result_count = $playmatches[1];
}
else {
$result_count = 0;
}
echo ($result_count);?> Results<?