[ create a new paste ] login | about

Link: http://codepad.org/Oa3EdqVk    [ raw code | output | fork ]

PHP, pasted on Oct 27:
1
2
3
4
5
6
7
8
<?php
    $a = array('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p');
    $b = array('1');
    $b = array_merge($b, array_splice($b, 0, count($a) - count($b)));

    print_r($a);
    print_r($b);
?>


Output:
Array
(
    [0] => a
    [1] => b
    [2] => c
    [3] => d
    [4] => e
    [5] => f
    [6] => g
    [7] => h
    [8] => i
    [9] => j
    [10] => k
    [11] => l
    [12] => m
    [13] => n
    [14] => o
    [15] => p
)
Array
(
    [0] => 1
    [1] => 1
)


Create a new paste based on this one


Comments: