What will be the output of the following PHP code ?
<?php
$number = range(0, 5);
print_r ($number);
?>
<?php
$number = range(0, 5);
print_r ($number);
?>
A. Array ( [0] => 0 [1] => 1 [2] => 2 [3] => 3 [4] => 4 [5] => 5 )
B. Array ( [0] => 0 [1] => 0 [2] => 0 [3] => 0 [4] => 0 [5] => 0 )
C. Array ( [0] => 5 [1] => 5 [2] => 5 [3] => 5 [4] => 5 [5] => 5 )
D. Array ( [0] => 0 [5] => 5 )
Answer: Option A
Solution(By Examveda Team)
The range() function creates an array containing a range of elements.Related Questions on Arrays
A. karnataka 11,35,000
B. 11,35,000
C. population 11,35,000
D. karnataka population
Which function will return true if a variable is an array or false if it is not?
A. this_array()
B. is_array()
C. do_array()
D. in_array()
Join The Discussion