➤ The range() function creates an array containing a range of elements.This
function returns an array of elements from low to high. If the low parameter
is higher than the high parameter, the range array will be from high to low.
Syntax:
range(low, high, step)
// third parameter is optional, Specifies the increment used in the range. Default is 1
For instance:
// Return an array of elements from "0" to "20".increment by 5.
$number = range(0,20,5);
print_r ($number);
// outputs : 0 5 10 15 20
// Using letters - return an array of elements from "a" to "k"
$letter = range("a","k");
print_r ($letter);
// outputs : a b c d e f g h i j k