[Solved] How can I increment by a value by 1 for every 50 times a foreach loop runs


        <?php 
    $counter = 0;
    $value = 50; // Intial position
    $numbers = 230 // Lets say you have total 230 iterations.
    for ($i = 0 ; $i <= $numbers ; i++)
    {
     if($i == $value) // if 50 counter is increased and we are setting the value to 100
{
$counter += 1;
$value = $value * 2;
}
}

solved How can I increment by a value by 1 for every 50 times a foreach loop runs