Does array_merge works on array of integers.
$range = array_merge(range(1, 1)
, range(1,10));
and output is
array(11) { [0]=> int(1) [1]=> int(1) [2]=> int(2) [3]=> int(3) [4]=> int(4) [5]=> int(5) [6]=> int(6) [7]=> int(7) [8]=> int(8) [9]=> int(9) [10]=> int(10) }
Edit:
You guys didn't understand my question. I was expecting that the second array would override the first, leaving only 1 element with 1
as a value. The result should have been
array(10) { [0]=> int(1) [1]=> int(2) [2]=> int(3) [3]=> int(4) [4]=> int(5) [5]=> int(6) [6]=> int(7) [7]=> int(8) [8]=> int(9) [9]=> int(10) }
Why isn't it so?
No comments:
Post a Comment