15.08.2013, 23:38
To loop it you can do something like:
You could define a variable, in this case I used 'MAX_LOCATIONS', to represent the maximum number of locations, or you can simply count them up and put the number in yourself. I have never done that sort of thing when it comes to your constant so I can't offer anything up on that. This loops should eliminate the need to manually enter all of those in, so long as you can still obtain the data you need from your constant.
Good luck, I hope this helps!
PHP код:
if (response)
{
for (new i; i < MAX_LOCATIONS; i++)
{
if (listitem == i)
{
// Do your code here.
}
}
}
Good luck, I hope this helps!