private function unique_multidim_array($array, $key)
    {
        $temp_array = array();
        $i = 0;
        $key_array = array();

        foreach($array as $val) {
            if (!in_array($val[$key], $key_array)) {
                $key_array[$i] = $val[$key];
                $temp_array[$i] = $val;
            }
            $i++;
        }
        return $temp_array;
    }
private function unique_multidim_array($array, $key)
    {
        $temp_array = array();
        $i = 0;
        $key_array = array();

        foreach($array as $val) {
            if (!in_array($val[$key], $key_array)) {
                $key_array[$i] = $val[$key];
                $temp_array[$i] = $val;
            }
            $i++;
        }
        return $temp_array;
    }
private function unique_multidim_array ( $ array , $ key ) { $ temp_array = array ( ) ; $ i = 0 ; $ key_array = array ( ) ; foreach ( $ array as $ val ) { if ( ! in_array ( $ val [ $ key ] , $ key_array ) ) { $ key_array [ $ i ] = $ val [ $ key ] ; $ temp_array [ $ i ] = $ val ; } $ i ++ ; } return $ temp_array ; }
Produces an array with unique entries from an array with possible duplicate entries
@param  array $array Array with possible duplicate entries
@param  string $key  The key to use when determining what is duplicate
@return array        An array of unique entries
Produces an array with unique entries from an array with possible duplicate entries