&$v) { echo "key=$k value=$v\n"; if ($k == 0) $val = 1; else $val = $arr[$k-1]; $arr[$k+1] = $val; ++$i; if ($i >= 20) break; } } f7();