PHP: Create an array for a range

Take a look at the range function.

$array = range(1, $num);

Leave a Comment