roundcubemail/program/lib/Roundcube/rcube_db.php
public function array2list($arr, $type = null)
    {
        if (!is_array($arr)) {
            return $this->quote($arr, $type);
        }

        foreach ($arr as $idx => $item) {
            $arr[$idx] = $this->quote($item, $type);
        }

        return implode(',', $arr);
    }
public function array2list($arr, $type = null)
    {
        if (!is_array($arr)) {
            return $this->quote($arr, $type);
        }

        foreach ($arr as $idx => $item) {
            $arr[$idx] = $this->quote($item, $type);
        }

        return implode(',', $arr);
    }
public function array2list ( $ arr , $ type = null ) { if ( ! is_array ( $ arr ) ) { return $ this -> quote ( $ arr , $ type ) ; } foreach ( $ arr as $ idx => $ item ) { $ arr [ $ idx ] = $ this -> quote ( $ item , $ type ) ; } return implode ( ',' , $ arr ) ; }
Return list of elements for use with SQL's IN clause

@param array  $arr  Input array
@param string $type Type of data (integer, bool, ident)

@return string Comma-separated list of quoted values for use in query
Return list of elements for use with SQL s IN clause