PHP strpos() Function Example

PHP Script:

echo strpos(“PHP TUTORS strpos FUNCTION EXAMPLE”,”strpos”);




PHP strpos() function returns the position of the first occurrence of a string inside source string.

PHP strpos function parameters:

1- string: Source string from which another string search.
2- string to find.
3- start: where the search is start from [optional]

If the string is not found false is returned.

One comment

  1. Pingback: PHP str_replace() Function Example | PHP Tutors

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s