-1
$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 error : 정의되지 않은 오프셋 0 여기서 '여기'라고 언급했는데, 문제는 무엇입니까?정의되지 않은 오프셋 PHP 다차원 배열
/난 당신이 더 나은 어떤 결과를 포함하거나하지 않는 것이 첫 번째 루프에서
$query->result_array()
을 확인해야 codeigniter./
'위해서 var_dump ($ TEMPFILES가)'첫 번째 루프 후, 당신은 무엇을 참조하십시오. – deceze
array (size = 0) empty –
그래서 다른 코드는 실행되지 않았습니다. – deceze