Apply for Zend Framework Certification Training


After Creating Project Setup 
we will see How value will be passed from Controller to view 

user.php  //Controller
defined('BASEPATH') OR exit('No direct script access allowed');

class User extends CI_Controller 
    public function index(){
       $data['first_name'] = "Rajesh";
       $data['address'] = "Faridabad";
       $data['qualification'] = "MCA";


-----------Here we can see that $data is an array 
in which we have assigned Three Values and later on 
we have assigned array data  to view
In view folder 
   -- view

In user_about.php 
  you need to write the code to retrieve data

        echo "Name - ".$first_name;
        echo "Address - ".$address;
        echo "Qualification - ".$qualification;



< How to setup a 404 page in CodeIgniter website Last >

Ask a question

  • Question:
    • Answer:
      {{answer.blog_answer_description  }}
    Replay to Question

Back to Top