[ create a new paste ] login | about

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

PHP, pasted on Aug 23:
1
2
3
4
5
6
7
8
9
<?php

$array = array(
0 => "bar",
1 => "foo",
"a" => "zai"
);

var_dump(array_combine($array, $array));


Output:
1
2
3
4
5
6
7
8
array(3) {
  ["bar"]=>
  string(3) "bar"
  ["foo"]=>
  string(3) "foo"
  ["zai"]=>
  string(3) "zai"
}


Create a new paste based on this one


Comments: