I'm having trouble with validating if a value exists in an array because it always comes out as false. The values to be compared are just single integers against the array but it doesn't validate it the way I need it to.
I'm having trouble with validating if a value exists in an array because it always comes out as false. The values to be compared are just single integers against the array but it doesn't validate it the way I need it to.
Your array of numbers are strings "1", "2", "3", etc. Comparing 1 = "1" is not equal (would return false). If you are comparing a number to a string, then you need to either convert the number to a string, or the string to a number so the data type matches as well as the value.
WarrenBelz
146,670
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,013
Most Valuable Professional