[ create a new paste ] login | about

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

PHP, pasted on Jul 25:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php
$options = array (
                  "1567" => "test",
                  "1853" => "test1",
                  );


$option = array (
"none" => "N/A"
);

$final = array_merge($option,$options);
var_dump($final);

$finalNew = $option + $options ;
var_dump($finalNew);

?>


Output:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
array(3) {
  ["none"]=>
  string(3) "N/A"
  [0]=>
  string(4) "test"
  [1]=>
  string(5) "test1"
}
array(3) {
  ["none"]=>
  string(3) "N/A"
  [1567]=>
  string(4) "test"
  [1853]=>
  string(5) "test1"
}



Create a new paste based on this one


Comments: