September 2001
Intermediate to advanced
768 pages
32h 45m
English
array range(int low, int high)
Returns an array of integers from the specified starting point to the highest value specified.
Returns:
Array containing the integers from low to high
Description:
Creates an array of integers beginning with the value specified by low and increasing by one for each element until high has been reached.
Version:
PHP 3 since 3.0.8, PHP 4 since 4.0b4
Example:
$numbers = range(1, 10);
echo "Numbers: ", implode(", ", $numbers);
Output:
Numbers: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
|
Read now
Unlock full access