Menu
Hi
i am trying to increment an array with a value from within a foreach loop.
here is the foreach loop:
[COLOR=”Red”]foreach($list as $item)
{
$row->set(‘STYLE’,$style);
$row->set(‘ID’,$item[‘Id’]);
$row->set(COMMENTS,$item[‘Comments’]);
}[/COLOR]
i want to create a new array and populate it with the Id value from the above loop.
i had this within the foreach but i dont think it is in the correct place as it seems to only contain the last value of the loop:
[COLOR=”Blue”]$faultArray = array();
$faultArray = $item[‘Id’];
any help is appreciated
cheers!