Question
Better way to get the index of where the string is without using a mass of if else logic.
Hi
if I have an array like so
['price'],
['user'],
['time']
I want to set a bunch of predifined variables like so
<cfset PriceIndex = 1>
<cfset UserIndex = 2>
<cfset TimeIndex = 3>
Now I'm only showing 3 variables andactuaally have 12.
Since my array can have string variables in any order (but the strings don't change)
is there a better way to get the index of where the string is without using a mass of if else logic.
Many thanks.