Welcome Guest, Not a member yet? Register   Sign In
Returning Data From a Class (solved: pass $data to the method)
#1

[eluser]blackhalobender[/eluser]
Is there some way to append rather then re-assign?


in my class:
Code:
...
$detail[name] = $row->name;
$detail[body] = $row->body;
return detail;
...

In my controller:
Code:
...
$data['someStaticData'] = 'x';
$data = $this-Myclass->detail($id);
...

In my view:
Code:
<?=$someStaticData;?>


This is a simplified example, but should this work? Right now x isn't defined any longer once the view loads.


Messages In This Thread
Returning Data From a Class (solved: pass $data to the method) - by El Forum - 01-21-2008, 04:09 PM



Theme © iAndrew 2016 - Forum software by © MyBB