eval.in

Paste #838283

PHP — PHP 7.0.8, pasted 1 year ago (json)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php

$arr1 = Array 
(
'0' => Array
    (
        '0' => "Title1" ,
        '1' => "Title2",
        '2' => "Title3"
    ),
'1' => Array
    (
        '0' => "Title1"  ,
        '1' => "Title2",
    )
);
$arr2 =  Array
   (
'0' => Array
    (
        '0' => "Value1" , 
        '1' => "Value2",
        '2' => "Value3",
    ),
'1' => Array
    (
        '0' => "Value" ,
        '1' => "Value2"
    )
);


$arr3 = array($arr1,$arr2);

print_r($arr3);

Program Output

Array
(
    [0] => Array
        (
            [0] => Array
                (
                    [0] => Title1
                    [1] => Title2
                    [2] => Title3
                )

            [1] => Array
                (
                    [0] => Title1
                    [1] => Title2
                )

        )

    [1] => Array
        (
            [0] => Array
                (
                    [0] => Value1
                    [1] => Value2
                    [2] => Value3
                )

            [1] => Array
                (
                    [0] => Value
                    [1] => Value2
                )

        )

)

OK (0.016 sec real, 0.017 sec wall, 16 MB, 556 syscalls)

Fork