How To Append Rows In Ecsvexport Without Redundant Headers?

this is my test code…when i first ran it, it outputs correct…but when i changed the

name value like e.g sasori2 and re-ran the script again, the csv file is appending another

set of headers and data…how can i prevent the headers from being appended again underneath

the existing row of data? because there’s already a header at the topmost row of the csv file right?

   	$a = new blahblah();



    	$name = $a->getName();

    	echo "<br/>".$name;


    	$ssn = $a->getSSN();

    	echo "<br/>".$ssn;


    	$phone = $a->getPhone();

    	echo "<br/>".$phone;


    	$loanamount = $a->getLoanAmount();

    	echo "<br/>".$loanamount;

    	$a->setLoanTenure('3 years');

    	$loantenure = $a->getLoanTenure();

    	echo "<br/>".$loantenure;


    	$installmentamount = $a->getInstallmentAmount();

    	echo "<br/>".$installmentamount;

    	$date = date('d-M-Y h:ia',strtotime('today'));




    	$filename =  Yii::app()->basePath . '/data/blahblah/file.csv';

		echo $filename;

		$data = array(




		$csv = new ECSVExport($data);

		$headers = array('Name','SSN','Phone','Loan Amount','Loan Tenure','Instalment Amount','Date');