how to new Table in a loop?

R

robertchen117

I want to new different table for different months in my hash, but the
new HTML::Table need to return a variable, I could not use $($table .
$month), what should I do?

foreach $month (sort keys %months_days) {
@days = @{$months_days{$month}};
if($#days > 0){
#$mystring = "table" . $month;
$table1 = new HTML::Table(-align=>'left',
#-head=> ['Sunday', 'Monday', 'Tuesday', 'Wednesday',
'Thursday', 'Friday', 'Saturday'],
-width=>'60%',
#-align=>'center',
-border=>0,
);

$table1->setCellAlign('center');
....
}
 
R

robertchen117

I want to new different table for different months in my hash, but the
new HTML::Table need to return a variable, I could not use $($table .
$month), what should I do?

foreach $month (sort keys %months_days) {
@days = @{$months_days{$month}};
if($#days > 0){
#$mystring = "table" . $month;
$table1 = new HTML::Table(-align=>'left',
#-head=> ['Sunday', 'Monday', 'Tuesday', 'Wednesday',
'Thursday', 'Friday', 'Saturday'],
-width=>'60%',
#-align=>'center',
-border=>0,
);

$table1->setCellAlign('center');
...



}- Òþ²Ø±»ÒýÓÃÎÄ×Ö -

- ÏÔʾÒýÓõÄÎÄ×Ö -

I mean tables, not just one table.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,772
Messages
2,569,593
Members
45,111
Latest member
KetoBurn
Top