Organizing data returned from a while loop.

General discussions related to php

Moderators: egami, macek, gesf

Post Reply
User avatar
ruturajv
php-forum Super User
php-forum Super User
Posts: 1279
Joined: Sat Mar 22, 2003 9:42 am
Location: Mumbai, India
Contact:

Fri Jul 04, 2003 5:42 am

ok for this

Code: Select all

while ($row=mysql_fetch_assoc($result)) {
  echo("<table><tr><td>");
  echo($row['somecolumn']);
  echo("</table>");
  echo("<table><tr><td>");
  echo($row['othercolumn']);
  echo("</table>");

I think this shall help!!
:D

daveyboy
New php-forum User
New php-forum User
Posts: 6
Joined: Sat Jul 05, 2003 12:57 am

Sat Jul 05, 2003 1:20 am

not sure that would work out quite right, I have this sort of thing a lot:

Code: Select all

print "<table>";
while ($row=mysql_fetch_assoc($result)) {
    print "<tr><td>";
    print $row["col1"];
    print "</td><td>";
    print $row["col1"];
    print "</td></tr>";
}
print "</table>";


works for me at least :p
Dave.

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests