Jump to content

Help on coding


aeroheli

Recommended Posts

Hi, I would like to add a condition in this code to have the forum insert "</tr><tr>" if the {counter} hits 3, can someone help me? Thank you so much!

 

 

{foreach item="image" from=$records}

 

 

<td>

{if $use_fancy_urls}

<a href="listings/view/{$image.make|strip:"-"}/{$image.model|strip:"-"}/

 

{$image.listingid}/"><img src="{$image.imagethumbpath}" title="{$smarty.const.IMAGE} {counter}"

 

alt="{$smarty.const.IMAGE} {counter}" /></a><br><br><b>{$image.ad_title}</b><br></td>

 

 

 

{else}

<a href="listings.php?make={$image.make|strip:"-"}&model=

 

{$image.model|strip:"-"}&id={$image.listingid}"><img src="{$image.imagethumbpath}"

 

title="{$smarty.const.IMAGE} {counter}" alt="{$smarty.const.IMAGE} {counter}" /></a><br><br><b>

 

{$image.ad_title}</b><br></td>

 

{/if}

 

 

 

 

 

{/foreach}

Link to comment
https://forums.phpfreaks.com/topic/157168-help-on-coding/
Share on other sites

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.