Welcome Guest, Not a member yet? Register   Sign In
Properties in my controller
#3

[eluser]skaterdav85[/eluser]
That did not work either. Actually, what I found out was that PHP wont create an array for you if you're using it as a property in a class. You have to explicitly create the array, and then you can assign elements to it. If you do something like $_DATA['title'] = "Contact" not in a property context, PHP will create the _DATA array for you if it has not been created. I'm not really sure why. Anyways, this solved the problem:

Code:
public $_DATA = array('title'=>'Contact');


Messages In This Thread
Properties in my controller - by El Forum - 07-04-2010, 03:02 PM
Properties in my controller - by El Forum - 07-04-2010, 07:23 PM
Properties in my controller - by El Forum - 07-04-2010, 09:17 PM
Properties in my controller - by El Forum - 07-04-2010, 11:10 PM
Properties in my controller - by El Forum - 07-04-2010, 11:33 PM
Properties in my controller - by El Forum - 07-04-2010, 11:38 PM
Properties in my controller - by El Forum - 07-04-2010, 11:56 PM



Theme © iAndrew 2016 - Forum software by © MyBB