title: PHP fputcsv insert into a new line in csv file
body: <p>I have a file name <strong>checklist.csv</strong> </p>
  
  <p>I try to insert a new information in this file using <code>php</code></p>
  
  <p>My method work and i can insert a new information in the file </p>
  
  <p>But i have a problem that the new information is near the past information</p>
  
  <p><strong>Example</strong></p>
  
  <p>,92,electrical,Final As built drawing,,,,,,,,,,,,,,,,,,,,,93,electrical,test,,,,,,,,,,,,,,,,,,,,</p>
  
  <p><strong>But what i want is to look like this in the file:</strong></p>
  
  <p>,92,electrical,Final As built drawing,,,,,,,,,,,,,,,,,,,,</p>
  
  <p>,93,electrical,test,,,,,,,,,,,,,,,,,,,,</p>
  
  <p>This is the code i use</p>
  
  <pre><code> $number=secure($_POST['txt_number'],"num");
        $category=secure($_POST['txt_category'],"text");
        $desc=secure($_POST['txt_desc'],"ibtext");
        $file = fopen('checklist.csv', 'a+');
        $csv=array();
        $csv[]="";
        $csv[]=$number;
        $csv[]=$category;
        $csv[]=$desc;
        $csv[]="";
        $csv[]="";
        $csv[]="";
        $csv[]="";
        $csv[]="";
        $csv[]="";
        $csv[]="";
        $csv[]="";
        $csv[]="";
        $csv[]="";
        $csv[]="";
        $csv[]="";
        $csv[]="";
        $csv[]="";
        $csv[]="";
        $csv[]="";
        $csv[]="";
        $csv[]="";
        $csv[]="";
        $csv[]="";
        fputcsv($file,$csv);
        fclose($file);
  </code></pre>
  
  <p>How I add the new information in a new line??!! </p>