function fox_assoc_unique($arr, $key) { $tmp_arr = array(); foreach ($arr as $k => $v) { if (in_array($v[$key], $tmp_arr) || !$v['link'] || $v['link']=='#' || strstr($v['link'],'java')) { unset($arr[$k]); } else { $tmp_arr[] = $v[$key]; } } sort($arr); return $arr; }