我正在尝试使用数组值创建动态变量。 并得到此错误:
注意:数组到字符串的转换 /opt/lampp/htdocs/project/transit_loss.php,第674行
<tr>
<th>Bottles</th>
<th><?php echo $quarter_months; ?>(<?php echo $quarter; ?>)</th>
<th><?php echo $year; ?></th>
<?php
foreach ($tl_beer_columns_row as $columns) {
foreach ($tl_beer_data as $key) {
?>
<td><?php echo $key[$columns['COLUMN_NAME']]; ?></td>
<?php
$$columns['COLUMN_NAME'] = 0;
print_r($$columns['COLUMN_NAME']);
$$columns['COLUMN_NAME'] += key[$columns['COLUMN_NAME']];
}
}
?>
</tr>