View Full Version : Help with XTemplate; How to display last item in array.

22 Jul 2011, 10:32 AM
I am outputting some data and some of the data is an array. I am only interested in outputting the LAST item in the array. Does anyone know how to accomplish this? Doing the first item is easy. I was doing

<tpl for="note"><tpl if="[xindex] == \'1\'">{content}</tpl></tpl>

but seeing how I don't know how many items will ultimately be in the array, I don't know how to specify the last one.