I tried that once too, but it never worked 🙁
The easiest thing to do, I think, is workin with arrays.
So the number-script will be something like this:
function incr_number($min_numb,$max_numb)
{
$number = array();
while ($min_numb !== $max_numb);
{
$number[$min_numb] = $min_numb;
$min_numb++;
}
return $number;
}