我有阵列`array( [0] =>array( [id] => 1, [item] => ring, [total] => 1000 ), [1] =>array( [id] => 1, [item] => book, [total] => 1000 ), [2] =>array( [id] => 1, [item] => pen, [total] => 400 ));`我需要[id]仅当首先显示相同值时的结果,[total]而其他需要 -如下所示的结果。 `array( [0] =>array( [id] => 1, [item] => ring, [total] => 1000 ), [1] =>array( [id] => 1, [item] => book, [total] => - ), [2] =>array( [id] => 1, [item] => pen, [total] => 400 ) );`谢谢您的帮助。
1 回答
- 1 回答
- 0 关注
- 166 浏览
添加回答
举报
0/150
提交
取消