- Isn't the newline already removed?
- function createcsv($tablename){
- $rs = $this->SelectAll($tablename);
- $rs1 = $this->SelectAll($tablename);
- if($rs){
- $string ="";
- /// Get the field names
- $fields = mysql_fetch_assoc($rs1);
- if(!is_array($fields))
- return;
- while(list($key,$val) =each($fields)) {
- $string .= $key.',';
- }
- $string = substr($string,0,-1)."