php tutorial - PHP strpos Function - php programming - learn php - php code - php script




  • The String position - strpos function is used to locate and return the position of a character(s) within the string.

Sphp script Syntax :

strpos(string,find,start);
click below button to copy the code. php tutorial - team

  • The first argument defines the text.
  • Second argument finds where the particular text is in the string.
  • Third argument is optional that defines where to begin the search.

php 7 Sample Code : sample php program

<!DOCTYPE html>
<html>
    <body>
        <?php
            echo strpos('welcome to wikitechy', 'wikitechy');
        ?>
    </body>
</html>
click below button to copy the code. php tutorial - team

php programmer Code Explanation :

Code Explanation for strpos Function In PHP

  1. In this example we use the string positon function the first parameter define the content “welcome to wikitechy” and the second parameter is positon of the finding the content as “wikitechy”.

php development Sample Output :

output for strpos Function In PHP

  1. Output -> we have shown the string position function, where we found that “Wikitechy” is appearing after the 11th position in the given statement “welcome to wikitechy “.


Related Searches to php strpos function

Adblocker detected! Please consider reading this notice.

We've detected that you are using AdBlock Plus or some other adblocking software which is preventing the page from fully loading.

We don't have any banner, Flash, animation, obnoxious sound, or popup ad. We do not implement these annoying types of ads!

We need money to operate the site, and almost all of it comes from our online advertising.

Please add wikitechy.com to your ad blocking whitelist or disable your adblocking software.

×