• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
UGH! Arrays are giving me a headache :(

#5
[eluser]Kinsbane[/eluser]
[quote author="Kinsbane" date="1222308954"]Well, I must say, I am a pretty fart smeller. For a while I didn't know why I was getting the last record in the dataset (id #6), because of the way I was assigning the data to the $data['divisions']. (each loop was replacing the data previously there).

I guess at that point I would then need to have $data['divisions'][1], $data['divisions'][2], etc..[/quote]

Yup, that did it:
Code:
$index = 0;
foreach($this->divisions->result_array() as $row)
{
    $data['division'][$index] = $row;
    print_r($row);
    $index++;
}


Messages In This Thread
UGH! Arrays are giving me a headache :( - by El Forum - 09-24-2008, 12:30 PM
UGH! Arrays are giving me a headache :( - by El Forum - 09-24-2008, 02:00 PM
UGH! Arrays are giving me a headache :( - by El Forum - 09-24-2008, 02:24 PM
UGH! Arrays are giving me a headache :( - by El Forum - 09-24-2008, 03:15 PM
UGH! Arrays are giving me a headache :( - by El Forum - 09-24-2008, 03:18 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.