strpos in PHP works in a different way. If you are used to Java then it will come as no surprise that you will have your head scratching into confusion why it does not give the correct output.

So far in the strpos PHP page, contributors gave their own versions of strpos. The most accurate and the function that worked the way I wanted it to the same way that indexOf works in Java is by contributor

This is his function.

Related Posts Plugin for WordPress, Blogger...