Welcome Guest, Not a member yet? Register   Sign In
[RESOLVED] 'Array to string conversion' error when using query to obtain dropdown list values from database.
#4

[eluser]Tim in Tulsa[/eluser]
OK... I figured this out. The "issue" with the getDomainList() function turned out to be a red herring.

It turns out that the problem was in my controller implementation. I used .= to try to "add" information to the $data array. Obviously, this caused the implicit cast of $data from an array to a string. Here's the code that I had:
Code:
$data = $this->workroom_model->commonLayout();

            $data .= $this->workroom_model->getInputFormFieldAttributes();

I corrected the code as follows and voila everything fine:
Code:
$data = $this->workroom_model->commonLayout();

            $data = array_merge($data, $this->workroom_model->getInputFormFieldAttributes());

I guess this is just another newbie mistake! :-)

Tim


Messages In This Thread
[RESOLVED] 'Array to string conversion' error when using query to obtain dropdown list values from database. - by El Forum - 06-23-2010, 08:17 PM



Theme © iAndrew 2016 - Forum software by © MyBB