noxiousonline
New Member
I am using strpos() to find the needle in the haystack. But, I want it to only find the needle with the same string length. E.g.:\[code\]$mystring = '123/abc';$findme = 'abc';$pos = strpos($mystring, $findme); // THIS IS FINE$mystring = '123/abcdefghijk';$findme = 'abc';$pos = strpos($mystring, $findme); // THIS IS NOT FINE\[/code\]So, I need to check the string length of the found string and match that to the needle to see if they are the same length. So, 123/abc matches abc correctly, but I don't want 123/abcdefghijk to match abc because it is much longer than 3 characters.