$tempfiles=array();
$i=0;
foreach ($query->result_array() as $row) {
$sql='Select * FROM file WHERE name="'.$row['filename'].'"';
$q=$this->db->query($sql);
foreach ($q->result_array() as $tuple) {
$tempfiles[$i]['content']=$tuple['content'];
$tempfiles[$i]['owner']=$tuple['content'];
$tempfiles[$i]['last_modified_date']=$tuple['last_modified_date'];
}
$i++;
}
$i=0;
$files=array();
foreach ($query->result_array() as $row) {
$files[$i]['name']=$row['filename'];
here: $files[$i]['content']=$tempfiles[$i]['content'];
here: $files[$i]['owner']=$tempfiles[$i]['owner'];
here: $files[]['last_modified_date']=$tempfiles[$i]['last_modified_date'];
$i++;
}
php 错误:未定义的偏移量 0 在我提到“这里”的行中,我无法弄清楚的问题是什么?
/我正在使用codeigniter。/