Hiya,
http://www.tizag.com/phpT/php-string-strpos.php
On the above link, it is stated:
PHP Code:
$numberedString = "1234567890"; // 10 numbers from 1 to 0
$fivePos = strpos($numberedString, "5");
echo "The position of 5 in our string was $fivePos";
Display:
The position of 5 in our string was 4
Notice that the position is 4, which may seem confusing at first, until you realize that PHP starts counting from 0.
The number 1 - Position 0 - No match
The number 2 - Position 1 - No match
The number 3 - Position 2 - No match
The number 4 - Position 3 - No match
The number 5 - Position 4 - Match
Although we only searched for a single character, you can use this function to search for a string with any number of characters. Also, it is important to note that this function will return the position of the start of the first match. So if we had searched the same string for "567890" we would again find a match and position 4 because that is where the match starts.
I do not understand the last part and so can someone show an example:
So if we had searched the same string for "567890" we would again find a match and position 4 because that is where the match starts.