The range function in PHP creates an array containing the specified range of cells

Source: Internet
Author: User
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

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.