public function columnsByType(int $type) : array
    {
        $n = $this->numColumns();

        $columns = [];

        for ($i = 0; $i < $n; $i++) {
            if ($this->columnType($i) === $type) {
                $columns[$i] = $this->column($i);
            }
        }

        return $columns;
    }
public function columnsByType(int $type) : array
    {
        $n = $this->numColumns();

        $columns = [];

        for ($i = 0; $i < $n; $i++) {
            if ($this->columnType($i) === $type) {
                $columns[$i] = $this->column($i);
            }
        }

        return $columns;
    }
public function columnsByType ( int $ type ) : array { $ n = $ this -> numColumns ( ) ; $ columns = [ ] ; for ( $ i = 0 ; $ i < $ n ; $ i ++ ) { if ( $ this -> columnType ( $ i ) === $ type ) { $ columns [ $ i ] = $ this -> column ( $ i ) ; } } return $ columns ; }
Return the columns that match a given data type.

@param int $type
@return array
Return the columns that match a given data type .