Skip to content

Instantly share code, notes, and snippets.

@shouhei
Created December 21, 2013 03:53
Show Gist options
  • Save shouhei/8065169 to your computer and use it in GitHub Desktop.
Save shouhei/8065169 to your computer and use it in GitHub Desktop.
重複した連想配列の中身を削除するスクリプト
<?php
$target_ary = array();
$eval_ary=array();
$result_ary = array();
foreach($target_ary as $key => $value){
if(!in_array($value, $eval_ary)){
$eval_ary[] = $value;
$result_ary[] = $value;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment