Welcome Guest, Not a member yet? Register   Sign In
Array issue
#1

[eluser]sinvos[/eluser]
Trying to change some data that gets returns using $query->result_array()
Code:
Foreach($query->result_array() as $row)
     {
        $row['name'] = '<input type="text" name="name" value="'.$row['name'].'" size="13" />';
     }
     echo $this->table->generate($query);
My understanding should have worked but nothing happens and table populates normally. So i tried a different way
Code:
Foreach($query->result_array() as $row)
     {
       $data[]=$row
       $data['name']='<input type="text" name="name" value="'.$row['name'].'" size="13" />';
     }

  echo $this->table->generate($data);
Now the data is mixed and it only returns 2 rows none of which is header. So whats the proper way of making this happen??
Thanks in advance.


Messages In This Thread
Array issue - by El Forum - 01-12-2009, 04:01 PM
Array issue - by El Forum - 01-12-2009, 05:13 PM
Array issue - by El Forum - 01-13-2009, 02:15 AM
Array issue - by El Forum - 01-14-2009, 04:55 PM



Theme © iAndrew 2016 - Forum software by © MyBB