Jump to content

Dynamic content with php addition


nextman

Recommended Posts

im trying to fix an image rotator on my site to display dynamic content but im having trouble with the thumbnails. i need some php to put out this code:

 

<a href="#1" class="cross-link active-thumb"><img src="/images/art/31thumb.jpg" class="nav-thumb" alt="temp-thumb" /></a>
	<div id="movers-row">

		<div><a href="#2" class="cross-link"><img src="/images/art/32thumb.jpg" class="nav-thumb" alt="temp-thumb" /></a></div>
		<div><a href="#3" class="cross-link"><img src="/images/art/33thumb.jpg" class="nav-thumb" alt="temp-thumb" /></a></div>
		<div><a href="#4" class="cross-link"><img src="/images/art/34thumb.jpg" class="nav-thumb" alt="temp-thumb" /></a></div>
		<div><a href="#5" class="cross-link"><img src="/images/art/37thumb.jpg" class="nav-thumb" alt="temp-thumb" /></a></div>
		<div><a href="#6" class="cross-link"><img src="/images/art/30thumb.jpg" class="nav-thumb" alt="temp-thumb" /></a></div>

	</div>

 

the image source is dynamic and i know how to grab it but i dont know how to get the integers for the href tag. also, another problem is that the first integer goes outside the "movers-row" div. this is what i have at the moment:

 

{foreach from=$articles item=latest_article key=id}

	<div id="movers-row">

		<div><a href="" class="cross-link"><img src="/images/art/{$articlethumb}.jpg" class="nav-thumb" alt="temp-thumb" /></a></div>

		 	{/foreach}
	</div>

 

help :(

Link to comment
https://forums.phpfreaks.com/topic/188397-dynamic-content-with-php-addition/
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.