PHP strpos() Function

The strpos() function returns the position of the first occurrence of a string inside another string.

strpos — Find position of first occurrence of a string

If the string is not found, this function returns FALSE.
Syntax:

strpos($string,$needle,$start)

$string – Required. Specifies the string to search
$needle – Required. Specifies the string to find
$start – Optional. Specifies where to begin the search

Example:

$mystring = ‘abc’;
$findme = ‘c’;
$pos = strpos($mystring, $findme);

The output of the code above will be: 3

Please refer this link too http://qualitypointtech.net/forum/viewtopic.php?f=25&t=480 for more information about strpos().

Posted in Php