Buona sera a tutti, avrei il seguente problemino...sto usando questo codice che mi estrapola dei record da db e me li visualizza su 2 colonne, mi chiedevo se era possibile ordinare i dati al posto che in orizzontale in verticale.
codice:<?php $sql_prod = "SELECT * FROM rf_sotcat where id_cat = '$id_cat_url' order by nome"; $query_prod = mysql_query ($sql_prod, $link); if ($row = mysql_fetch_row($query_prod)) { $i=1; } else { $i=0; } ?> <table width="97%" border="0" cellspacing="0" cellpadding="0" height="2"> <tr align="right" valign="top"> <td colspan="2" height="30">« Torna indietro</td> </tr> <?php while ($i) { ?> <tr> <?php for ($j=0; $j<2; $j++) { if ($row[1] == '') { ?> <td width="50%" align="center" valign="top"></td> <?php } else { ?> <td>» <? echo stripslashes($row[2]); ?></td> <?php } if ($i==1 && !($row = mysql_fetch_row($query_prod))) { $i=0; $row[0] = ""; } } ?> </tr> <tr> <td></td> <td width="50%"></td> </tr> <?php } ?> </table>