Jason:
On Wed, Jul 10, 2002 at 10:04:45PM -0800, Jason Soza wrote:
>
> I have this nice piece of code to take my SQL result and organize it into a
> nice 5 column table:
Nice is in the eye of the beholder... Here's what I think is nice:
echo "<table width=\"100%\" border=\"0\" align=\"center\">\n";
echo " <tr>\n";
while ($row = mysql_fetch_array($sql, MYSQL_ASSOC)) {
echo ' <td align="center"><a href="year.asp?year=';
echo $row['grad_year'] . '">' . $row['grad_year'] . "</a></td>\n";
}
echo " </tr>\n";
echo "</table>\n\n";
If you want to reverse the order, use an ORDER BY clause in your query
string.
--Dan
--
PHP classes that make web design easier
SQL Solution | Layout Solution | Form Solution
sqlsolution.info | layoutsolution.info | formsolution.info
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php