original_string: protected function fputcsv($filePointer, $dataArray, $delimiter = ",",   $enclosure = "\"")
    {
      // Build the string
      $string = "";
      // No leading delimiter
      $writeDelimiter = false;
      foreach ($dataArray as $dataElement) {
        // Replaces a double quote with two double quotes
        $dataElement = str_replace("\"", "\"\"", $dataElement);
        // Adds a delimiter before each field (except the first)
        if ($writeDelimiter) {
          $string .= $delimiter;
        }
        // Encloses each field with $enclosure and adds it to the string
        if ($enclosure) {
          $string .= $enclosure . $dataElement . $enclosure;
        } else {
          $string .= $dataElement;
        }
        // Delimiters are used every time except the first.
        $writeDelimiter = true;
      }
      // Append new line
      $string .= "\n";
      // Write the string to the file
      fwrite($filePointer, $string);
    }
code: protected function fputcsv($filePointer, $dataArray, $delimiter = ",",   $enclosure = "\"")
    {
      // Build the string
      $string = "";
      // No leading delimiter
      $writeDelimiter = false;
      foreach ($dataArray as $dataElement) {
        // Replaces a double quote with two double quotes
        $dataElement = str_replace("\"", "\"\"", $dataElement);
        // Adds a delimiter before each field (except the first)
        if ($writeDelimiter) {
          $string .= $delimiter;
        }
        // Encloses each field with $enclosure and adds it to the string
        if ($enclosure) {
          $string .= $enclosure . $dataElement . $enclosure;
        } else {
          $string .= $dataElement;
        }
        // Delimiters are used every time except the first.
        $writeDelimiter = true;
      }
      // Append new line
      $string .= "\n";
      // Write the string to the file
      fwrite($filePointer, $string);
    }
code_tokens: protected function fputcsv ( $ filePointer , $ dataArray , $ delimiter = "," , $ enclosure = "\"" ) { // Build the string
   $ string = "" ; // No leading delimiter
   $ writeDelimiter = false ; foreach ( $ dataArray as $ dataElement ) { // Replaces a double quote with two double quotes
   $ dataElement = str_replace ( "\"" , "\"\"" , $ dataElement ) ; // Adds a delimiter before each field (except the first)
   if ( $ writeDelimiter ) { $ string .= $ delimiter ; } // Encloses each field with $enclosure and adds it to the string
   if ( $ enclosure ) { $ string .= $ enclosure . $ dataElement . $ enclosure ; } else { $ string .= $ dataElement ; } // Delimiters are used every time except the first.
   $ writeDelimiter = true ; } // Append new line
   $ string .= "\n" ; // Write the string to the file
   fwrite ( $ filePointer , $ string ) ; }
docstring: Write a line to a file
  
  @param string $filePointer  File resource to write in
  @param array  $dataArray    Data to write out
  @param string $delimiter    Field separator
  @param string $enclosure    Enclosure
docstring_tokens: Write a line to a file