[eluser]Brent M[/eluser]
HI:
I'm new to CI, but relatively experienced with PHP. The app I'm retooling to work with CI used to use INCLUDES to accomplish allot of what I needed.
The item I'm having problems with is the generation of the selections options into an array to then be used in a form drop down in the view.
I'm getting a syntax error around the '=>' usage. I believe I've got the code formatted properly [??], but then .. "
Its always something stupid".
The code in my Model file:
Code:
$this->load->database() ;
$this->db->select('report');
$this->db->where('Company','1');
$this->db->from('policy') ;
$query = $this->db->get() ;
if ($query->num_rows() > 0) ;
{
$row = $query->row_array('report') ;
$data['report'] = $row['report'] ;
}
$this->db->select('ACCT','DESCR');
$this->db->where('CLASS','500');
$this->db->from('accts') ;
$query2 = $this->db->get() ;
// ('0' => '--Select One--') ;
if ($query2->num_rows() > 0)
{ foreach ($query2->result() as $row )
{
>> Error Line >> $acct_array[$query2->$row_id] = $query2->row_array('ACCT' => 'DESCR') ;
}
}
$this->load->view('load_post_view',$data);
The reported 'offence' is on the >> Error Line >>
A hint, or even a kick in the pants to get me going in the right direction would be appreciated.
Thanks for your help
Brent