【发布时间】:2011-07-26 11:17:04
【问题描述】:
找到解决方案并投票
这是我的代码:
//go through each question
foreach($file_data as $value) {
//separate the string by pipes and place in variables
list($title, $content, $date_posted) = explode('|', $value);
//create an associative array for each input
$file_data_array['title'] = $title;
$file_data_array['content'] = $content;
$file_data_array['date_posted'] = $date_posted;
}
会发生什么是关联值不断被删除。有没有办法可以将值附加到数组?如果没有,我还能怎么做?
【问题讨论】:
-
你必须接受正确答案^_^
-
前 15 分钟没让我。我的评论有点先发制人。 . .
标签: php foreach associative-array