I'm having kind of a baffling problem while parsing an input from a text box. Here's the run down:
I read a barcode into a text box (11 digits).
Then, parse that barcode into 6 variables.
The first variable is in the form "0x" where x is 1 through 9.
I pass the first variable to a function, and based on what value the variable holds, the function will return a string
if($barcode_set == 01) return("A");
else if($barcode_set == 02) return("B");
else if($barcode_set == 03) return("C");
else if($barcode_set == 04) return("D");
else if($barcode_set == 05) return("E");
else if($barcode_set == 06) return("F");
else if($barcode_set == 07) return("G");
else if($barcode_set == 08) return("H");
else if($barcode_set == 09) return("I");
$barcode_set is what I am passing to the function, and it will be one of the values 01 through 09. As the code stands right now, I can pass 01 through 07 and the string is returned as expected in the above example. The problem comes with I pass 08 or 09. The function will not return the string. I can change the check for 08 to 10, and then pass 10, and the string returns correctly, but not with 08 or 09.
So my question, am I missing something completely? Why would the function not return the string associated with 08 or 09 but will return it if I change it to 10?? Any help would be greatly appreciated.