$numbers = range(1, 10); //生成包含1到10的數(shù)組
$evenNumbers = range(2, 10, 2); //生成包含2到10的偶數(shù)數(shù)組
$numbers = range(10, 1); //生成包含10到1的遞減數(shù)組
$letters = range('a', 'z'); //生成包含a到z的字母數(shù)組
$chars = range('A', 'Z'); //生成包含A到Z的字符數(shù)組
$chars = range('a', 'z'); //生成包含a到z的字符數(shù)組
$numbers = range(1, 5);
$string = implode(',', $numbers); //將數(shù)組轉(zhuǎn)換成逗號分隔的字符串輸出:1,2,3,4,5
$assocArray = array_combine(range('a', 'e'), range(1, 5)); //生成包含鍵值對的數(shù)組,鍵為a到e,值為1到5