Welcome Guest, Not a member yet? Register   Sign In
global var declaration not working
#1

[eluser]jerry01[/eluser]
i'm trying to have a list i can use throughout my controller. i can't find a way of getting it to work with "var"

can anyone comment?

it seems that var does not really pass the full info.


Code:
class Controller extends CI_Controller
{

    var $field_list = array('f1','f2','f3','f4','f5','f6');
...

    function index()
    {
        foreach($this->field_list as $field):
            print("------&gt;" + $field + "<BR>");
        endforeach;

the outcome of that is just a bunch of zeroes..


Messages In This Thread
global var declaration not working - by El Forum - 07-15-2011, 11:10 AM
global var declaration not working - by El Forum - 07-15-2011, 11:15 AM
global var declaration not working - by El Forum - 07-15-2011, 11:23 AM
global var declaration not working - by El Forum - 07-15-2011, 11:26 AM



Theme © iAndrew 2016 - Forum software by © MyBB