Range () function
function
The function returns the cells from low to high in the array,
contain themselves, if low>high, then sequence from high to low
"Scope of Use"
>=3.0.8, PhP4, PHP5
Use
Range (First,second,step)
first/required/specified minimum value of array element
second/required/specified array element maximum value
step/optional/specified interval between elements/default is 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
)
*/
Excerpts from Zuodefeng's notes
http://www.bkjia.com/PHPjc/478195.html www.bkjia.com true http://www.bkjia.com/PHPjc/478195.html techarticle The function " function" of the range () function returns the cells from low to high in the array, including themselves, if Lowhigh, the sequence from high to low "use range" =3.0.8, PhP4, php5 ...