php - Remove duplicates from multidimensional array sub key -


i trying make php array unique. looks this:

 ....  [7] => array         (             [extensions] => array                 (                     [empty cart] => array                         (                             [title] => title                             [name] => cwp_emtpy_cart_title                             [type] => input                             [default] => might interested in:                             [help] =>                          )                 )          )      [8] => array         (             [extensions] => array                 (                     [idea vote] => array                         (                             [title] => must logged in vote                             [name] => cwp_idea_logged_in                             [type] => dropdown                             [options] => array                                 (                                     [0] => yes (default)                                     [1] => no                                 )                              [default] => 0                             [help] =>                          )                  )          ) 

i want combine 2 array keys name "extensions". trying get:

    [7] => array         (             [extensions] => array                 (                     [idea vote] => array                         (                             [title] => must logged in vote                             [name] => cwp_idea_logged_in                             [type] => dropdown                             [options] => array                                 (                                     [0] => yes (default)                                     [1] => no                                 )                              [default] => 0                             [help] =>                          )                  )                 array (                      [empty cart] => array                         (                             [title] => title                             [name] => cwp_emtpy_cart_title                             [type] => input                             [default] => might interested in:                             [help] =>                          )                 )          ) 

when array created tried using:

array_unique 

as as:

array_map('unserialize', array_unique(array_map('serialize', $commercewp_settings_array))); 

however neither has effect @ all.


Comments

Popular posts from this blog

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

jsf - "PropertyNotWritableException: Illegal Syntax for Set Operation" error when setting value in bean -

laravel - Undefined property: Illuminate\Pagination\LengthAwarePaginator::$id (View: F:\project\resources\views\admin\carousels\index.blade.php) -