Re: Dumping fields.....

From: Date: Sat, 28 Jul 2001 06:10:27 +0000
Subject: Re: Dumping fields.....
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-60031@lists.php.net to get a copy of this message
Hi Looks like the range of the <TR> block overlaps the range of the <TH> block I usually generate all the TH stuff first .... You can then generate the <TR> <TD> and data elements as needed after that for each row HTH Jeff Lewis wrote: > Using this function to dump a table, having a problem outputting the value > below after the SELECT * FROM $ID. > > function dump($ID, $link) { > echo "<font class=\"txt\">Dumped table > <b>$ID</b></font><table > border=\"1\"><tr>"; > $fields = mysql_list_fields("hyrum_nuke", $ID, $link); > $columns = mysql_num_fields($fields); > for ($i = 0; $i < $columns; $i++) { > echo "\t<th>". mysql_field_name($fields, $i) . > "</th>\n"; > } > echo "</tr>"; > $query = mysql_query("SELECT * FROM $ID;"); > while ($line = mysql_fetch_array($query)) { > while ($value = each($line)){ > $value = ereg_replace("<", "&lt;", $value); > $value = ereg_replace(">", "&gt;", $value); > echo "<td > valign=\"top\"><pre>$value</pre></td>"; > } > } > echo "</table>"; > } > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net -- Dell Coleman PICO Technology Corp.

« previous php.general (#60031) next »