for ($number = 1; $number <=10; $number++) { if($number <= 9){ echo $number . ','; }else{ echo $number . '!'; } }
1,2,3,4,5,6,7,8,9,10!