in reply to using 'use CGI;' and tables
Statically:
print($q->table( $q->tr( $q->td("row 1, col 1"), $q->td("row 1, col 2"), ), $q->tr( $q->td("row 2, col 1"), $q->td("row 2, col 2"), ), ));
Dynamically:
my $table = [ [ 'row 1, col 1', 'row 1, col 2', ], [ 'row 2, col 1', 'row 2, col 2', ], ]; { my $table_body = '' foreach (@$table) { my $row_body = ''; foreach (@$_) { $row_body .= $q->td($_); } $table_body .= $q->tr($row_body); } print($q->table($table_body)); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: using 'use CGI;' and tables
by bscruggs99 (Initiate) on Apr 13, 2006 at 05:00 UTC | |
by ikegami (Patriarch) on Apr 13, 2006 at 05:13 UTC | |
by bscruggs99 (Initiate) on Apr 13, 2006 at 05:16 UTC | |
by ikegami (Patriarch) on Apr 13, 2006 at 05:35 UTC |