php - remove array on duplicate value -


i need help. want remove array on array list when there duplicate value. have array

array ( [11] => array     (         [0] => array             (                 [count] => 2                 [price] => 1000                 [total] => 2000             )          [1] => array             (                 [count] => 0                 [price] => 124                 [total] => 0             )          [2] => array             (                 [count] => 0                 [price] => 1000                 [total] => 0             )          [3] => array             (                 [count] => 0                 [price] => 2345                 [total] => 0             )      )  [12] => array     (         [0] => array             (                 [count] => 0                 [price] => 1000                 [total] => 0             )          [1] => array             (                 [count] => 1                 [price] => 124                 [total] => 124             )          [2] => array             (                 [count] => 0                 [price] => 1000                 [total] => 0             )          [3] => array             (                 [count] => 0                 [price] => 2345                 [total] => 0             )      ) ) 

as may notice there duplication value on price key. want remove array if the count equal 0. if duplicate price has no value on count. remove 1 duplicate array. expected output this.

array ( [11] => array     (         [0] => array             (                 [count] => 2                 [price] => 1000                 [total] => 2000             )          [1] => array             (                 [count] => 0                 [price] => 124                 [total] => 0             )           [2] => array             (                 [count] => 0                 [price] => 2345                 [total] => 0             )      )  [12] => array     (         [0] => array             (                 [count] => 0                 [price] => 1000                 [total] => 0             )          [1] => array             (                 [count] => 1                 [price] => 124                 [total] => 124             )         [2] => array             (                 [count] => 0                 [price] => 2345                 [total] => 0             )      ) ) 

please thanks.


Comments

Popular posts from this blog

searchKeyword not working in AngularJS filter -

sequelize.js - Sequelize: sort by enum cases -

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -