Breaking News
Home / PHP / Use strpos function in php to find specific text within string

Use strpos function in php to find specific text within string

Search given text within string variable using strpos() string function in php.

Strpos() method is used to search specific text within the given string variable and if this function finds the given character or string then it will return the characters position in numeric form. So here is the complete step by step tutorial for Use strpos function in php to find specific text within string.

How to Use strpos function in php to find specific text within string.

Code for strpos_function.php file.

 <?php

//Main string .
$WebsiteName = "Android-Examples.com";

//printing E index value on screen.
echo strpos($WebsiteName, "E");


?>

Screenshot:

About VikasKumar

This Website is Full Free Download Metas ...................

Check Also

Print Echo array values on screen using forEach loop in php

Display all array list elements one by one using ForEach loop control statement echo in …