range - chung-leong/qb GitHub Wiki

range - Create an array containing a range of elements

array range( number $start, number $end [, number $step ] )

range() creates an array containing a range of elements.

Parameters:

start - First value of the sequence.

end - The sequence is ended upon reaching the end value.

step - If a step value is given, it will be used as the increment between elements in the sequence. step should be given as a positive number. If not specified, step will default to 1.

Return Value:

An array of elements from start to end, inclusive.

Version

1.4 and above.