PHP strpos() Function

P
PHP strpbrk() Function
PHP strrchr() Function

what is the syntax of the STRPOS() function in php?

strpos(string,find,start)
ParameterDescription
stringRequired. Specifies the string to search
findRequired. Specifies the string to find
startOptional. Specifies where to begin the search. If start is a negative number, it counts from the end of the string.
PHP STRPOS() method

examples of the STRPOS() function

Example 1. In this example, we find the position of the first occurrence of “php” inside the string.

<?php
echo strpos("I love php, I love php too!","php");
?>
PHP strpbrk() Function
PHP strrchr() Function

Add comment

Tutor Network

Share this

Learn PHP from A to Z