Hello,
I have a codeigniter code that is working on local Apache installation. But it does not work on Godaddy Hosting.
I have got other similar views and controllers which are working on Godaddy.
Following is the code. I have pasted only relevant code.
Controller:
function index() { $this->load->model('Feedmodel'); $data['posts']=$this->Feedmodel->gethomedata(); $this->load->view('home',$data); }
View: PHP CODE ONLY
foreach($posts as $post){
echo $post['url'];
}
The error that I am getting is
A PHP Error was encountered Severity: Notice
Message: Undefined variable: posts
Filename: views/home.php
Line Number: 59
A PHP Error was encountered Severity: Warning
Message: Invalid argument supplied for foreach()
Filename: views/home.php
Line Number: 59