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
    • 123
    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 :

    range(low,high,step)
    

    Example :

    <?php
    $number = range(0,50,10);
    print_r ($number);
    ?>
    

    Output:

     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
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: