Hello,
Does anyone know how I can determine if an exact number exists in a string of similar comma separated numbers?
For example, if I want to determine whether or not the single number or value 1 exists in a string like 2, 11, 3, 22, 1, 89, 111, 34..., can it be done?
So far I've tried some options like strpos and preg_match but seem to be having trouble determining only the single csv of 1. I get a match from the 11 or 111, but I don't want to know if they exist. I only want to know if the single csv of 1 is in the string or not.
And, what about finding only the 11 in that same string as well?
Thank you in advance.