poj.. my $i; foreach $i (@field_desc) { print "<TH>$i</TH>\n"; } print qq "</TR>"; my $SQL = "SELECT $field_list FROM property"; my $sth = $dbh->prepare($SQL); $sth->execute() or die $dbh->errstr; my @row; while ( @row = $sth->fetchrow_array() ) { print qq(<tr>); for (@row){ print qq(<td>$_</td>); } print qq(</tr>); } print "</TABLE>"; print $q->end_html; $dbh->disconnect() or die $dbh->errstr;
In reply to Re: foreach loop
by poj
in thread foreach loop
by r_mehmed
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |