The Most Accurate strpos Implementation

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 teddanzig@yahoo.com.

This is his function.

Related Posts Plugin for WordPress, Blogger...

Leave a Reply

Your email address will not be published. Required fields are marked *