public function print_csv_data($return = false) {
        fseek($this->fp, 0);
        $returnstring = '';
        while (($content = fgets($this->fp)) !== false) {
            if (!$return){
                echo $content;
            } else {
                $returnstring .= $content;
            }
        }
        if ($return) {
            return $returnstring;
        }
    }
public function print_csv_data($return = false) {
        fseek($this->fp, 0);
        $returnstring = '';
        while (($content = fgets($this->fp)) !== false) {
            if (!$return){
                echo $content;
            } else {
                $returnstring .= $content;
            }
        }
        if ($return) {
            return $returnstring;
        }
    }
public function print_csv_data ( $ return = false ) { fseek ( $ this -> fp , 0 ) ; $ returnstring = '' ; while ( ( $ content = fgets ( $ this -> fp ) ) !== false ) { if ( ! $ return ) { echo $ content ; } else { $ returnstring .= $ content ; } } if ( $ return ) { return $ returnstring ; } }
Echos or returns a csv data line by line for displaying.

@param bool $return  Set to true to return a string with the csv data.
@return string       csv data.
Echos or returns a csv data line by line for displaying .