I found the way... $i = 0; $result = mysql_query("SELECT * FROM sometable"); echo " <tr> \n"; while($row = mysql_fetch_array($result)){ echo " <td>".$row[id]."</td>\n"; if($i % 2 == 1){ echo " </tr>\n"; echo " <tr>\n"; } $i++; } echo " </tr>\n";
I hope that this can help to somebody... Romeo Manzur wrote: > Hi, I wonder how could I do a script for print direfent data on > diferents columns from a table... > I mean this > $result = mysql_query("SELECT * FROM xxx"); > while(($row = mysql_fetch_array($result)){ > echo "<table> > echo " <tr> > echo " <td>".$row[id]."<td>\n";//id for the firt record ex:1 > echo " <td>".$row[id]."<td>\n";//id for the second record ex: 2 > echo " </tr>\n"; > echo "</table>\n"; > > if I do this it prints the same record value... > > please I need help... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]