Create a table with more than 1 column

From: Date: Thu, 27 Dec 2001 14:22:09 +0000
Subject: Create a table with more than 1 column
Groups: php.general 
Request: Send a blank email to php-general+get-78838@lists.php.net to get a copy of this message
Hi list, I am in a big trouble. My deadline is coming and I couldn't solve my problem yet! I have this script that outputs a table that can be seen at http://www.celebnet.com.br/abc.php $ultletra = ''; $row = ''; while($resultado = $query->dados()) { $curletra = $resultado['letra']; if($curletra != $ultletra) { if (!empty($row)) { $row .= "</tr>\n"; } $row .= "<tr>\n<td>\n<img src=\"img/letras/$curletra.gif\" width=\"24\" height=\"24\">\n</td>\n</tr>\n"; } $row .= "<td><a href=\"interna.php?cat=$resultado[Nome_Categoria]&celebID=$resultado[CelebID ]\">".$resultado['Nome_Artistico']."</a></td>\n"; $ultletra = $curletra; } if (!empty($row)) { $row .= "<tr>\n"; } SQL is: SELECT categorias.Nome_Categoria,celebridades.CelebID,celebridades.Nome_Artistico, lcase(left(Nome_Artistico,1)) as letra FROM categorias LEFT JOIN celebridades ON categorias.CategoriaID=celebridades.Categoria WHERE CategoriaID='1' ORDER BY Nome_Artistico My problem is that I need to modify the script to output a 3 column table. I have tried everything but nothing works, and I've tried also all url about PHP that i could found. Please I'll appreciate any help. Thank's in advance and happy new year to all!!! Rodrigo Peres (Brazil)

« previous php.general (#78838) next »