Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Batch migration CSV Problem


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>";
$fields = array_shift($csv_rows);
foreach($csv_rows AS $idx => $video) {
$video_meta = array_combine($fields, $video);
$upload_params = array();


so am getting array_combine warnings and array is not parsing correctly and not importing videos correctly on windows and mac.

please advise me.


1 Community Answers

Cooper Reid

JW Player Support Agent  
0 rated :

Hi Praveen,

Values in the CSV that contain commas show be enclosed by a double quote ("). Example

“outdoors, sports, nature”

You can also define the enclosure character in PHP if you wish to use something different:


This question has received the maximum number of answers.