Welcome Guest, Not a member yet? Register   Sign In
Help: Using dropdown form helper with an Array from model
#4

[eluser]xwero[/eluser]
Code:
if ($query->num_rows() > 0)
{
     $return = $query->first_row('array');
     for($i = 1;$i<$query->num_rows();$i++)
     {
       $return = array_merge($return,$query->next_row('array'));  
     }
     return $return;
}
Instead of letting a method create the array you create one yourself.

edit : changed code inside of the loop because it was not working.


Messages In This Thread
Help: Using dropdown form helper with an Array from model - by El Forum - 10-16-2008, 07:01 AM



Theme © iAndrew 2016 - Forum software by © MyBB