[Solved] Divide numbers into equal parts to create Sitemap from mysql


Try like

$part_size = 500;
$limit = 2990;

for($i=0;$i<=$limit;$i=$i+$part_size)
{
    $j = $i + $part_size;
    if($j > $limit) {
        $j = $limit;    
    }
    $resultArray[] = $i.','.$j;
}
print_r($resultArray);

0

solved Divide numbers into equal parts to create Sitemap from mysql