英 [re?nd?]? ?美 [rend?]??
n.范圍;射程;類別;(山脈,房屋等的)排列
vi.搜索;變化;延伸;漫游
vt.排列;(按一定位置或順序)排序;把…分類;徘徊
adj.牧場的,放牧區(qū)的
第三人稱單數(shù): ranges 復數(shù): ranges 現(xiàn)在分詞: ranging 過去式: ranged 過去分詞: ranged
php range()函數(shù) 語法
作用:創(chuàng)建一個包含指定范圍的元素的數(shù)組
語法:range(low,high,step)
參數(shù):
參數(shù) | 描述 |
low? | 必需。規(guī)定數(shù)組的最低值。 |
high? ?? | 必需。規(guī)定數(shù)組的最高值。 |
step | 可選。規(guī)定元素之間的步進制。默認是 1。 |
說明:該函數(shù)創(chuàng)建一個數(shù)組,包含從?low?到?high?(包含?low?和?high)之間的整數(shù)或字符。如果?high?比?low?小,則返回反序的數(shù)組。
php range()函數(shù) 示例
輸出:
Array ( [0] => 1 [1] => 2 [2] => 3 [3] => 4 [4] => 5 [5] => 6 )
輸出:
Array ( [0] => b [1] => c [2] => d [3] => e )