Home >Backend Development >PHP Problem >What does range mean in php
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
range(low,high,step)Parameter Descriptionlow 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); ?>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!