Range () function [function] This function will return the units from low to high in the array, including themselves, if low & gt; high, then the sequence is from high to low [use range] & gt; 3.0.8, php4, php5 [use] range (first, second, step) first/required/specified array element...
Range () function
[Function]
This function returns the units from low to high in the array,
Include themselves. if low> high, the sequence starts from high to low.
Scope of use]
> = 3.0.8, php4, and php5
[Use]
Range (first, second, step)
First/required/minimum value of the array element
Second/required/specify the maximum value of an array element
Step/optional/specify the interval between elements/default value: 1/this parameter is added after php5
[Example]
[Php]
Print_r (range (0, 5 ));
Print_r (range (5, 1 ));
Print_r (range (0, 5, 2 ));
Print_r (range (0, 5, 3 ));
/*
Array
(
[0] => 0
[1] => 1
[2] => 2
[3] => 3
[4] => 4
[5] => 5
)
Array
(
[0] => 5
[1] => 4
[2] => 3
[3] => 2
[4] => 1
)
Array
(
[0] => 0
[1] => 2
[2] => 4
)
Array
(
[0] => 0
[1] => 3
)
*/
Taken from zuodefeng's note