Monday 15 May 2006 6:49:12 pm
I would like to loop an array and build an html code. My array contanis always multiple of 2 objects (2,4,6,8... etc), all of them being images (class image) In an array of 8 elements, element 1 of the array is always linked to number 5, thus 2 is linked to 6, 3 is linked to 7 and 4 is linked to 8 (when I say linked I mean they are related in someway) I would like to loop the array (only half the amount of items inside it, in this example 4), and access within the loop object 1 and 5, 2 and 6, 3 and 7, 4 and 8. So within one loop I DO NOT KNOW how to access different indexes of the array. Here is the pseudo-code, asume we are accessing the first element of the array,
{section var=child loop=$list_items}
<a onmouseover="return showPic(this)"
href="INSERT THE URL OF ELEMENT 5">
VISUALIZE IMAGE OF ELEMENT 1
</a>
{/section}
any help, please... thanks
Diseño Web Cuba
Web Design Cuba
www.elfosdesign.com
|