Loading…

What is the use of strpos in PHP?

strops() method is used to get the position of the first occurrence of a string inside another string.

Example

                                        

$mainString = 'Best Interview Question';
echo strpos($mainString, "Interview");
// OUTPUT : 5

Suggest An Answer

No suggestions avaliable!

Latest post from PHP Strings

Ask Question