diff --git a/parse-worldometers.php b/parse-worldometers.php index da1bcdf..b6044c5 100755 --- a/parse-worldometers.php +++ b/parse-worldometers.php @@ -21,7 +21,7 @@ foreach ($data as $scan){ $country = array(); $p2 = $parts[$i]->childNodes; $country[] = $p2[0]->textContent; - $deaths = (strpos($p2[6]->textContent, "+") !== false?$p2[6]->textContent:0); + $deaths = (strpos($p2[6]->textContent, "+") !== false?0:$p2[6]->textContent); $country[] = intval(str_replace(",", "", $p2[2]->textContent)); $country[] =intval(str_replace(",", "", $deaths)); $country[] =intval(str_replace(",", "", $p2[10]->textContent));