![]() |
incrementing value in section loop
I have the following code which loops through and creates an array of the sections. The problem with it is I am using the serviceid to define the array number. So instead of being event_services[0], event_services[1], event_services[2]. It is outputting like event_services[12], event_services[17], event_services[32].
How can I get it to output event_services[0], event_services[1], event_services[2]? Code:
{section name=list_num loop=$services_list} If I write it like the following it seems like list_num is undefined, only ont he "name part though, the "value" part works great. Code:
<INPUT type="hidden" name="event_services[{$list_num}][serviceid]" value="{$services_list[list_num].serviceid}"> |
|
Perfect. Thanks a lot Shan.
|
All times are GMT -8. The time now is 11:18 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.