Welcome Guest, Not a member yet? Register   Sign In
Dynamic Content in CI
#5

[eluser]stuffradio[/eluser]
Pff, this is basic and in the User guide Smile


Code:
//mycontroller.php

class Mycontroller extends Controller
{

    function Mycontroller()
    {
      parent::Controller();
    }

    function index()
    {
      $data['my_var'] = "some value";

      $this->load->view('myview', $data);
    }

}

Code:
//myview.php

echo "This is the value of " . $my_var . "!";


Messages In This Thread
Dynamic Content in CI - by El Forum - 12-09-2009, 08:36 AM
Dynamic Content in CI - by El Forum - 12-09-2009, 08:45 AM
Dynamic Content in CI - by El Forum - 12-09-2009, 11:18 AM
Dynamic Content in CI - by El Forum - 12-09-2009, 11:29 AM
Dynamic Content in CI - by El Forum - 12-09-2009, 12:22 PM
Dynamic Content in CI - by El Forum - 12-09-2009, 01:11 PM
Dynamic Content in CI - by El Forum - 12-09-2009, 01:16 PM
Dynamic Content in CI - by El Forum - 12-11-2009, 03:30 AM
Dynamic Content in CI - by El Forum - 12-11-2009, 04:40 AM
Dynamic Content in CI - by El Forum - 12-11-2009, 01:11 PM
Dynamic Content in CI - by El Forum - 12-12-2009, 05:15 AM
Dynamic Content in CI - by El Forum - 12-20-2009, 11:20 PM
Dynamic Content in CI - by El Forum - 12-21-2009, 08:38 AM
Dynamic Content in CI - by El Forum - 12-21-2009, 09:31 AM
Dynamic Content in CI - by El Forum - 12-21-2009, 06:02 PM
Dynamic Content in CI - by El Forum - 12-21-2009, 06:18 PM



Theme © iAndrew 2016 - Forum software by © MyBB