Hi,
I have allready declared part of a array with a varible inside the array value.
See code.
As you can see the the row_color is not ready for the array value untill i do the foreach statement. Is there a way where i can update the array while in the foreach statement?
$data[] = '<tr><td style="background:'.$row_color.';">
$data[] = '<tr><td style="background:'.$row_color.';">
$data[] = '<tr><td style="background:'.$row_color.';">
foreach ($data as $v)
{
$row_color = (! ( $count % 2 ) ) ? ( $GLOBALS['bgcolor1'] ) : ( $GLOBALS['bgcolor2'] );
$count ++;
$content .= $v;
}
Now i need to put the row_color into each array element.
Thanks in advance.