Welcome Guest, Not a member yet? Register   Sign In
ActiveRecord for CodeIgniter: Rails-style model interactions
#76

[eluser]easymind[/eluser]
Hi, nice work. I am also using it to create a formlibrary. I only have a slight wish/problem.

I want to foreach through the fields, of an object I created with your class and filled with a tablerow.

So for example:
Code:
$Voorstelling =& $this->load->model('Voorstelling');
$voorstelling = $Voorstelling->find($id);
foreach($voorstelling as $field=>$value)
{
    echo "$field has value $value<br/>";
}

As you are probably aware this is not doing what I want because the fields and their values are among many many other variables and values in the object. It seems the whole $CI or $this is inside the object. Any idea?


Messages In This Thread
ActiveRecord for CodeIgniter: Rails-style model interactions - by El Forum - 02-06-2008, 07:36 PM



Theme © iAndrew 2016 - Forum software by © MyBB