Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Range of an array in PHP

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 126
    Comment on it

    With use of range() function , it creates the array contains the range of an element.

    It will return an array of element from low to high.

    Syntax :

    1. range(low,high,step)

    Example :

    1. <?php
    2. $number = range(0,50,10);
    3. print_r ($number);
    4. ?>

    Output:

    1. Array ( [0] => 0 [1] => 10 [2] => 20 [3] => 30 [4] => 40 [5] => 50 )

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Reset Password
Fill out the form below and reset your password: