Search Results

Search found 1 results on 1 pages for 'user1523311'.

Page 1/1 | 1 

  • How to update csv column names with database table header

    - by user1523311
    I am facing this problem some past days and now frustrate because I have to do it. I need to update my CSV file columns name with database table header. My database table fields are different from CSV file. Now the problem is that first I want to update column name of CSV file with database table headers and then import its data with field mapping into database. Please help me I don't know how I can solve this. This is my php code: $file = $_POST['fileName']; $filename = "../files/" . $file; $list = $_POST['str']; $array_imp = implode(',', $list); $array_exp = explode(',', $array_imp); $fp = fopen("../files/" . $file, "w"); $num = count($fp); for ($c = 0; $c < $num; $c++) { if ($fp[c] !== '') { fputcsv($fp, $array_exp); } } fclose($fp);

    Read the article

1