为foreach()提供的参数无效

时间:2011-07-27 09:57:07

标签: php arrays codeigniter foreach

  

可能重复:
  how can convert $files contain to array?

我使用codeigniter。我有这个错误,我该如何解决?

A PHP Error was encountered
Severity: Warning
Message: Invalid argument supplied for foreach()
Filename: admin/tour.php
Line Number: 81


这是第80行:

$files = $this->multi_upload->go_upload();
        var_dump($files);
        $images = array();     
        foreach ($files as $img) {   //line 81
          $images[] = $img['file'];
        }

0 个答案:

没有答案