Несколько столбцов в csv

Я создаю загружаемый csv с php. Это то, что у меня есть до сих пор:

// output headers so that the file is downloaded rather than displayed header('Content-Type: text/csv; charset=utf-8'); header('Content-Disposition: attachment; filename=data.csv'); // create a file pointer connected to the output stream $output = fopen('php://output', 'w'); // output the column headings fputcsv($output, array('id', 'role_id', 'parent_id')); $list = RoleQuery::create()->find(); $list = $list->toArray(); $list = array_values($list); // loop over the rows, outputting them foreach($list as $fields){ fputcsv($output, $fields); } 

Просто для тестирования я выводил роли в моей базе данных. Проблема в том, что они все в одном столбце:

введите описание изображения здесь

Как я могу убедиться, что id, role_id и parent_id находятся в разных столбцах?