Hi All,
first post!, Im having a problem with str_replace inside a while loop. I have an array var named $csv_header_2.
the array is look like this see below
$csv_header_2 = ("Postcard"=>"Postcard","Sticker"=>Sticker)
and so on. The loop below performs a db functions and retrieve values for each postcard, sticker etc. so if done right the array should look like this
$csv_header_2 = ("Postcard"=>1027,"Sticker"=>300)
but i get
$csv_header_2 = ("Postcard"=>"Postcard","Sticker"=>50)
while(doing something)
{
while ($t_row = mysql_fetch_assoc($type_result))
{
$search = $t_row['product_type_name'];
$csv_header_2 = str_replace($search,$t_row['total_points'],$csv_header_2);
}
}
i cant figure this out and why it is not working, any help would be appreciated
D