Jump to content

Result Query multiple tables next to eachother


kbloem

Recommended Posts

Hi,

 

i have a database with multiple records. One of those values is an image. When i query the database and i want only the images as a result it gives the result in a field. It then fills up the field horizontal and when there is no more field left it starts a new row. That is what i want.

 

But now i want some extra info next to the picture so i put that in a table with two colums like this:

 

echo '<table border="1" width="400"><td><a href="'.$row['website'].'"> <img src="'.$row['prod_img'].'">

'.$row['prod_name'].' <a href="'.$row['website'].'">'.$row['website'].'</td></table>

';}}

 

But i still want the result to fill up the field and when the field is full i want the next results on a row below this....

 

Anyone?

Ok to be clear, this is what i have

 

echo'<table border="0">

<tr>

<td>

<a href="'.$row['website'].'"> <img src="'.$row['prod_img'].'">

</td>

<td>

'.$row['prod_name'].'<br/><br/> <a href="'.$row['website'].'">'.$row['website'].'

</td>

</tr>

</table>

';}}

 

Now it gives the next result below the other and i want i to give the result in 3x3.....

 

Result 1 , Result 2, Result 3

Result 4 , Result 5, Result 6

Result 7 , Result 8, Result 9

 

I hope it's clear now...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.