php - Remove indexing from an array -


i have following array:

array(3) {      [0]=> array(1) { ["theme_loader_plugin"]=> string(4) "_run" }      [1]=> array(1) { ["user_plugin"]=> string(4) "_run" }      [2]=> array(1) { ["sessions_plugin"]=> string(4) "_run" }  }  

is there way remove indexing using predefined php function , instead format this:

array(3) {      ["theme_loader_plugin"]=> string(4) "_run",     ["user_plugin"]=> string(4) "_run",     ["sessions_plugin"]=> string(4) "_run" }  

loop through array , merge them new array. hope -

$arr = array(     array("theme_loader_plugin"=>  "_run" ) ,    array("user_plugin"=> "_run" ) ,    array("sessions_plugin"=> "_run" ) ) ;  $new=  array(); foreach($arr $val) {   $new = array_merge($new, $val); } 

output

array(3) {   ["theme_loader_plugin"]=>   string(4) "_run"   ["user_plugin"]=>   string(4) "_run"   ["sessions_plugin"]=>   string(4) "_run" } 

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -