<? function nums_from($from, $to, $s){
echo $from.' ' ;
if ($from < $to){
nums_from($from + $s, $to, $s );
}
}
nums_from(1, 10, 2);
function nums_from($from, $to, $s) {
static $x = 0;
echo ( $from + $x ).' ' ;
$x = $from;
if ($from < $to){
nums_from($from + $s, $to, $s );
}
}
nums_from(1, 10, 2);
ideone.com/WyOXJx