The strpos() function is used to search for a character or a specific text within a string.
If a match is found, it will return the character position of the first match.
If no match is found, it will return nothing.
The following example how to use a strpos():
The result is come:
24
If the word is not present in the string, then no output will be displayed:
If a match is found, it will return the character position of the first match.
If no match is found, it will return nothing.
The following example how to use a strpos():
The result is come:
24
If the word is not present in the string, then no output will be displayed:
<?php echo 'hello world'; ?>


0 comments:
Post a Comment