Remove duplicates from multi-dimensional array 2


/ Published in: PHP
Save to your folder(s)

Works with any array


Copy this code and paste it in your HTML
  1. foreach ($tmp as $k => $v) {
  2. if (strpos(serialize($result),$v['id']) === FALSE) {
  3. $result[] = $v;
  4. }
  5. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.