Forum Moderators: coopster
I'm writing an autocomplete script and am using mb_substr_count() to count the number of substring occurrences to bring back keyword matches.
But I am only interested in having the wildcard on the right. mb_substr_count() brings back a match even if the needle is in the middle of the haystack.
Are there any other funcs I can use to specify the side of the wildcard, or would i have to use a regular expression?
----
I'm using UTF-8 data so need the multi-byte funcs.
[uk2.php.net ]
mb_strpos [php.net] should do the trick. :)