Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.