<?php $n = 3;$m = 2;for ($i = $n; ; $i = ($i < 7 ? $i + 1 : 1)){ echo $i . ' '; if ($i == $m) break;}
Standard input is empty
3 4 5 6 7 1 2
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!