SPUG: Loading an hashref into an array, displaying as table

Ramon Hildreth ramon at ramonred.net
Mon Oct 28 11:54:16 CST 2002


Hi,

I am trying to create a table in cgi, that displays the contents of an
array.

I know how to do the table part. The problem is trying to load the
array. I need to take a fetchrow_hashref, and load that into the array a
row at a time. I am thinking my basic structure will be something like
this:

While ( my $row = $sth->frechrow_hashref()0 {

Do some stuff--
	foreach my $field ($row) {
	push ( my @array_row, Tr
	td ( $field->{contact}),
	td, etc.....
	}
}
Print table (@array_row);

Any help would be greatly appreciated.

Ramon Hildreth.




Ramon Hildreth



 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     POST TO: spug-list at pm.org       PROBLEMS: owner-spug-list at pm.org
      Subscriptions; Email to majordomo at pm.org:  ACTION  LIST  EMAIL
  Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
 For daily traffic, use spug-list for LIST ;  for weekly, spug-list-digest
     Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org




More information about the spug-list mailing list