Jump to content

s4surbhi2218

Members
  • Posts

    51
  • Joined

  • Last visited

Posts posted by s4surbhi2218

  1. HI all,

    I am using php code to write into my csv file , its able to write successfully but every time i run my code the older data is lost and csv file is left with data which only the current run contains.

    I used this

     

    <?

    $list = array (

    array('aaa', 'bbb', 'ccc', 'dddd'),

    array('123', '456', '789'),

    array('"aaa"', '"bbb"')

    );

     

    $fp = fopen('test.txt', 'w');

     

    foreach ($list as $fields) {

    fputcsv($fp, $fields);

    }

     

    fclose($fp);

    ?>

     

    Any suggestions???

    Many thanks .

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.