
Batch migration CSV Problem
Hi,
I am importing videos with csv file into jwplatform with api.
am using sample code of jwplatform and its worked fine when i use it in windows and not working on mac.
The problem is,
Whenever there is a comma(,) in the field data then it is not parsing the rows correctly
am using this sample code
if(!empty($csv_filepath) && file_exists($csv_filepath)) {
$csv_rows = array_map('str_getcsv', file($csv_filepath));
//echo "<pre>";
//print_r($csv_rows);
$fields = array_shift($csv_rows);
//print_r($fields);
foreach($csv_rows AS $idx => $video) {
$video_meta = array_combine($fields, $video);
$upload_params = array();
etc
so am getting array_combine warnings and array is not parsing correctly and not importing videos correctly on windows and mac.
please advise me.
Thanks
Praveen