title: Image Upload Core MVC PHP: How can I append my successfully passed data in function in controller
body: <p>Need to upload Files in core MVC: successfully uploaded. Now I am successfully passing my array of selected file from calling function to controller. How can I use that array in controller. Its showing : Notice: Trying to get property of non-object in controller(i.e. inside foreach)</p>
  
  <p>controller: </p>
  
  <pre><code>function gallery($real_name) { 
    /*echo "&lt;pre&gt;"; print_r($real_name); die();*/ 
    foreach($real_name as $k=&gt;$v) { 
      // $sql = "INSERT INTO gallery SET image = '".$v-&gt;image."'"; /*echo "{$k} =&gt; {$v}";*/ 
      // /*print_r($sql); die;*/ } die(); 
      // if($this-&gt;DB-&gt;exeQuery($sql)) { return true; } } 
    }
  }
  </code></pre>