# Output of MySQL data

**URL:** <https://forum.kirupa.com/t/output-of-mysql-data/245429>\
**Category:** programming\
**Created:** [November 29, 2007, 5:14pm UTC](https://forum.kirupa.com/t/output-of-mysql-data/245429 "2007-11-29T17:14:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![LooInSpain](https://avatars.discourse-cdn.com/v4/letter/l/a88e57/32.png) [@LooInSpain](https://forum.kirupa.com/u/LooInSpain)\
**Post date:** [November 29, 2007, 5:14pm UTC](https://forum.kirupa.com/t/output-of-mysql-data/245429/1 "2007-11-29T17:14:31Z")

</div>

Hi,

I know this will sound like a very straightforward thing to everyone else, but I am having trouble with it.

I have a database that I can retrieve the info I want from it, but I am having trouble arranging the data into columns. What I have is a table with 9 fields that I want to display in one column for the first result. Then I want the next result to show in a column next to it.

I want to arrange the table with the results in a table with 3 columns max per row and as many rows as needed. I just can seem to figure it out, the results always come back in one column.

This is the code I’m currently using:

```auto

 echo "<td width='200'>". "<h1 align='center'>". $head ."</h1>" ."</td>";
 echo "<tr>";
 echo "<td align='center'>". "<img width='105' src='../". $image ."'></td>";
 echo "</tr>";
 echo "<td align='justify'>". $body ."</td>";
 echo "</tr>";
 echo "<tr>";
 echo "<td align='left'>". "Last Updated on the ". $day ." of ". $month .", ". $year ."</td>";
 echo "</tr>";
 echo "<tr>";
 echo "<td align='left'>". "<a href='dog_view.php?id=$id'>Click to View</a>" . "</td>";
 echo "</tr>";
    }
    echo "</table>";

```

Any help would be great.

Thanks

Loo
