Position of the first occurrence of "php" inside the string:
<?php
echo strpos("find php position in string","php");
?>
Result: 5
strpos( string, find, start)
Parameter | Description |
---|---|
string | Required. Specifies the string to search |
find | Required. Specifies the string to find |
start | Optional. Specifies where to begin the search. If start is a negative number, it counts from the end of the string. |
posted on 2017-12-28 14:39:50 - PHP Tutorials
posted on 2017-12-28 14:39:34 - PHP Tutorials
posted on 2017-12-28 14:38:54 - PHP Tutorials