hello,
I have an associative array that looks like this:
Array
(
[1940s] => Array
(
[tag_id] => 8
[count] => 1
[fontsize] => 16px
)
[academic] => Array
(
[tag_id] => 13
[count] => 1
[fontsize] => 16px
)
...
}
I need to be able to change the $array[val]['fontsize'] in a loop. I don't think I'm doing it right, because when I print_r after the loop the fontsize values are not changed. However, the loop echos the desired strings.
foreach($tagArray as $array => $val){
$zscoreInt = round($val['count']-$stdev);
$$val['fontsize'] = $avgFontsize + $zscoreInt . 'px';
echo $$val['fontsize'] . '<br />';
}
What's wrong? Thanks.