if ($an == 1) {$x = '1';}
if ($an == 2) {$x = '1, 2';}
if ($an == 3) {$x = '1, 2, 3';}
if ($an == 4) {$x = '1, 2, 3, 4';}
if ($an == 5) {$x = '1, 2, 3, 4, 5';}
if ($an == 6) {$x = '1, 2, 3, 4, 5, 6';}
if ($an == 7) {$x = '1, 2, 3, 4, 5, 6, 7';}
if ($an == 8) {$x = '1, 2, 3, 4, 5, 6, 7, 8';}
if ($an == 9) {$x = '1, 2, 3, 4, 5, 6, 7, 8, 9';}
if ($an == 10){$x = '1, 2, 3, 4, 5, 6, 7, 8, 9, 10';}
Gets the job done, but its not very efficient & it limits at 10, wondering if there is a better way to write this...
Thanks!
-Arron