Home >> PHP >> strpos() function in PHP

strpos() function in PHP

The strpos() function used for position of the first occurrence of a substring in a string.

Syntax

strpos(string,find,start_position)

Example

echo strpos('Hello dear, how are you','how');

Output

12

Post Your Comment

Next Questions
strrchr() function
strrev() function
strripos() function
strrpos() function
strspn() function
strstr() function
strtok() function
strtolower() function
strtoupper() function
strtr() function
substr() function
substr_compare() function
substr_count() function
substr_replace() function
trim() function
ucfirst() function
ucwords() function
wordwrap() function
array
Array type
Numeric array
Associate array
Multidimensional array
array() function
array_change_key_case() function

Copyright ©2022 coderraj.com. All Rights Reserved.