I have a code which works well up to 10 million i.e. 10,000,000 but stops working for higher value. Is there anyway to work with extremely large numbers in PHP
<?php
$num_value_string;
$counter=0;
for($i=1;$i<=100000000;$i++)
{
$num_value_string=(string)$i;
if(strstr($num_value_string,"17"))
$counter++;
}
echo $counter . " numbers between 1 to " . --$i . " contains 17";
?>