range()
range - Create an array containing a range of elements
Syntax
array range (
mixed $low,
mixed $high,
number $step)
Arguments
- low - Low value.
- high - High 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.
Description
Create an array containing a range of elements.
Version
PHP 4, 5
Return value
Returns an array of elements from low to high, inclusive. If low > high, the sequence will be from high to low.