• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
$this->load->vars($array)

#2
[eluser]Pascal Kriete[/eluser]
The load->vars function is used to pass variables to views (not to mention it extracts them). What you want here is a class variable.
Code:
class Blog {

    var $pr;

    function Blog()
    {
        parent::Controller();
        $this->pr = array(1, 2);
    }

    function index()
    {
        print_r($this->pr);
    ]
}


Messages In This Thread
$this->load->vars($array) - by El Forum - 06-30-2008, 03:19 AM
$this->load->vars($array) - by El Forum - 06-30-2008, 03:36 AM
$this->load->vars($array) - by El Forum - 06-30-2008, 03:38 AM
$this->load->vars($array) - by El Forum - 06-30-2008, 04:03 AM
$this->load->vars($array) - by El Forum - 06-30-2008, 04:08 AM
$this->load->vars($array) - by El Forum - 06-30-2008, 04:14 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.