//go through each question
foreach($file_data as $value) {
//separate the string by pipes and place in variables
list($category, $question) = explode('|', $value);
//place in assoc array
$data = array($category => $question);
print_r($data);
}
이것은 데이터의 가치를 대체하기 때문에 작동하지 않습니다. 그래도 각 루프마다 연관 값을 추가하려면 어떻게해야합니까? $file_data동적 크기를 갖는 데이터의 배열입니다.