我有陣列`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]僅當(dāng)首先顯示相同值時(shí)的結(jié)果,[total]而其他需要 -如下所示的結(jié)果。 `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 回答
- 0 關(guān)注
- 186 瀏覽
添加回答
舉報(bào)
0/150
提交
取消