PHP range() functionThe PHP range( ) function is used to create an array containing a range of elements. The PHP range( ) function returns an array of elements from low to high. This function was introduced in PHP 4.0. SyntaxParameter
ReturnsThe range( ) function returns array of elements. Example 1Output: ( [0] => 1 [1] => 2 [2] => 3 [3] => 4 [4] => 5 ) Example 2Output: Array ( [0] => a [1] => b [2] => c [3] => d [4] => e [5] => f [6] => g ) Example 3Output: 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, Example 4Output: ( [0] => z [1] => y [2] => x [3] => w [4] => v [5] => u )
Next TopicPHP Array Functions
|