db loop, i cant get it to align...
Posted by: FYIGeek (---.kellogg.id.cebridge.net)
Date: August 01, 2010 08:36PM

I know this is not an all php question but you guys seem cool so i thought i would ask.
My issue is i have this code to call info from my db in the php part and i loops the results 5 times
on mt page. but the output keeps making it as a new line not next to each other lol.

So it comes out like this:
|image|
|name|

|image|
|name|

|image|
|name| in the table.

I want it to display the way it did before 2 rows 5 collums:
|Image | | Image | | Image | | Image | | Image |
|Name | | Name | | Name | | Name | | Name |

Here is my code, maybe you can see my error:
<tr>
{if $brows == ""}
{else}
{foreach item=row from=$brows limit=5}
<td class="mainImageImg"><img src="../uploads/thumbs/{$row.featured_imgthumb}" width="110" height="90" border="0" /></td>
<td width="10" rowspan="2">&nbsp;</td>
</tr>
<tr><td class="mainImagetext"><a href="{$row.featured_url}{$row.id}">{$row.featured_title}</a></td>
{strip}
{/strip}
{/foreach}{/if}</tr>
</table>

I would appreciate a little help on this before i go insane lol.

Options: ReplyQuote
Re: db loop, i cant get it to align...
Posted by: stevenmartin99 (---.mobile.digiweb.ie)
Date: August 01, 2010 11:46PM

u have <tr> inside the loop

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: db loop, i cant get it to align...
Posted by: FYIGeek (---.kellogg.id.cebridge.net)
Date: August 02, 2010 12:52AM

Thanks, i got it fixed finally i forgot to ad an loop to my $brows lol.

****SOLVED****



Edited 3 time(s). Last edit at 08/02/2010 02:06AM by FYIGeek.

Options: ReplyQuote


Sorry, only registered users may post in this forum.