In this article, we use the range function in PHP to create an example of an array containing a specified range of cells, with the reference of a friend in need. Before, we introduced a quick way to create arrays in PHP, where the PHP range () function was used. In this article, we use the range function in PHP to create an example of an array containing a specified range of cells, with the reference of a friend in need. Before, we introduced a quick way to create arrays in PHP, where the PHP range () function was used. Everyone can refer to, as the warm-up of this article. This section learns the use of the range () function in PHP. Example:
Description: Array range (mixed $start, mixed $limit [, number $step = 1]); $start: Sequence start value $limit: Sequence end value $step: Step value; optional, default = 1; If the value is the same as $start will be error: Warning:range () [Function.range]: Step exceeds the specified range in/file location on line How many lines for example:
For specific uses of the range () function, please refer to the article: http://bbs.it-home.org/w3school/php/func_array_range.html |