Write a PHP program to create a range like the following array.
Array([20] => 2[21] => 3[22] => 4[23] => 5[24] => 6[25] => 7)
<?php print_r(array_combine(range(20, 25),range(2,7))); ?>
Sample Output:
Array ( [20] => 2 [21] => 3 [22] => 4 [23] => 5 [24] => 6 [25] => 7 )
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
Sample Output:
Array ( [20] => 2 [21] => 3 [22] => 4 [23] => 5 [24] => 6 [25] => 7 )need an explanation for this answer? contact us directly to get an explanation for this answer