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.
David_MA
161
Super User 2025 Season 1
Michael E. Gernaey
148
Super User 2025 Season 1
stampcoin
139