[ create a new paste ] login | about

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

PHP, pasted on May 29:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?php

$array1 = array('hi' => "Hello",
'bye'=> "Bye bye",
'w'=>"what", );

$array2 = array('hi' => "Hello",
'bye'=> "Bye bye",
'we'=>"where",
'w'=>"what",
);

$array3 = array_merge($array1, $array2);
ksort($array3);
print_r($array3);


Output:
1
2
3
4
5
6
7
Array
(
    [bye] => Bye bye
    [hi] => Hello
    [w] => what
    [we] => where
)


Create a new paste based on this one


Comments: