Q:

While Loop till number reached

I want to do something like this
$x = 630;
$y = 10;

while ($y < $x){
// do something
$y+10;
}

When I use $y++ it's working and adding +1, but with +10 it's not working. But I need to go in +10 steps. Any pointers ? 

A:

in your code, you are not incrementing $y : $y+10 returns the value of $y plus 10, but you need to assign it to $y.
You can do it with several ways :

$y = $y + 10;
$y += 10;

Example :
$x = 630;
$y = 10;
while ($y < $x){
    // do something
    $y = $y + 10;
}

