public static function removeColumns($filepath, array $columnIndexes, $delimiter=",", $enclosure='"')
    {
        $tmpFile = tmpfile();
        $fileHandle = fopen($filepath, "r");
        $lineNumber = 1;
        
        if ($fileHandle)
        {
            while (!feof($fileHandle))
            {
                $lineArray = fgetcsv($fileHandle, 0, $delimiter, $enclosure);
                
                if (!empty($lineArray))
                {
                    foreach ($columnIndexes as $columnHumanIndex)
                    {
                        $columnIndex = $columnHumanIndex - 1;
                        
                        if (!isset($lineArray[$columnIndex]))
                        {
                            $msg = "removeColumns: source CSV file does not have " . 
                                   "column: " . $columnIndex . " on line: " . $lineNumber;
                            
                            throw new \Exception($msg);
                        }
                        
                        unset($lineArray[$columnIndex]);
                    }
                    
                    fputcsv($tmpFile, $lineArray, $delimiter, $enclosure);
                }
                
                $lineNumber++;
            }
            
            fclose($fileHandle);
            
            $meta_data = stream_get_meta_data($tmpFile);
            $tmpFileName = $meta_data["uri"];
            rename($tmpFileName, $filepath); # replace the old upload file with new.
        }
        else
        {
            throw new \Exception("removeColumns: failed to open CSV file for trimming.");
        }
    }