In PHP, the range() function means to create an array containing elements in a specified range. This function can return an array of elements between the two specified parameters. The syntax is "range(low,high,step) ".

The operating environment of this tutorial: windows10 system, PHP7.1 version, DELL G3 computer
What does range mean in php
# The ##range() function creates an array containing elements in a specified range.
This function returns an array containing elements from low to high.
Note: If the low parameter is greater than the high parameter, the array created will be from high to low.
Syntax
range(low,high,step)
Copy after login
Parameter Description
low Required. Specifies the minimum value of an array element.
high Required. Specifies the maximum value of an array element.
step Optional. Specifies the stepping between elements. The default is 1.
The example is as follows:
<?php
$number = range(0,5);
print_r ($number);
?>
Copy after login
Output result:

Recommended learning: "
PHP Video Tutorial"
The above is the detailed content of What does range mean in php. For more information, please follow other related articles on the PHP Chinese website!