0

I'm trying to create dynamic variables using array value. And getting this error:

Notice: Array to string conversion in /opt/lampp/htdocs/project/transit_loss.php on line 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>
Sfili_81
  • 2,377
  • 8
  • 27
  • 36
Rohit Sahu
  • 284
  • 5
  • 15

0 Answers0