PHP Programing language

array_range() Function in PHP
Previous Home Next

array_range()

The range() function creates an array containing a range of elements and it returns an array of elements from low to high.

Syntax:
range(low,high,step)

In above syntax, "low" specifies the lowest value of the array, "high" specifies the highest value of the array and "step" specifies the increment used in the range and default range is 1

Example:

<?php
$num = range(40,100,10);
print_r ($num);
?>

Output:

Array ( [0] => 40 [1] => 50 [2] => 60 [3] => 70 [4] => 80 [5] => 90 [6] => 100 )

Previous Home Next

Tolal:0 Click:

Show All Comments

Did not find what you were looking for leave your name and message. We will revert within 24 hours
Name:
eMail:
Comment / Feedback: