View file File name : Welcome.php Content :<?php defined('BASEPATH') OR exit('No direct script access allowed'); class Welcome extends CI_Controller{ public function index(){ $this->load->model("Properties_model"); $data=$this->Properties_model->category(); //print_r($data); $this->load->model('Core_model'); $locations=$this->Core_model->get_locations(); $types=$this->Core_model->get_types(); $data=['category'=>$data,'most_pr'=>$most_pr,'most_near'=>$most_near,'best_township'=>$best_township,'locations'=>$locations,'types'=>$types]; $data['virar']=$this->Properties_model->get_location_counter('virar'); $data['umbergaon']=$this->Properties_model->get_location_counter('umbergaon'); $data['palghar']=$this->Properties_model->get_location_counter('palghar'); $data['boisar']=$this->Properties_model->get_location_counter('boisar'); $data['vapi']=$this->Properties_model->get_location_counter('vapi'); // print_r($types); // exit; //print_r($best_township); $this->load->view('index',$data); } } ?>