PHP Stripos () function

Source: Internet
Author: User

Example

Find the location where "PHP" first appears in the string:

<?phpecho Stripos ("You love php, I love php too!", "PHP"); >

Running an instance

Definition and Usage

The Stripos () function finds the position of the first occurrence of a string in another string (case insensitive).

Note: the Stripos () function is case insensitive.

Note: This function is binary safe.

related functions:
    • Strpos ()-finds the position of the first occurrence of a string in another string (case-sensitive)
    • Strripos ()-Finds the last occurrence of a string in another string (case insensitive)
    • Strrpos ()-Finds the last occurrence of a string in another string (case-sensitive)
Grammar
Stripos (string,find,start)
Parameters Description
String Necessary. Specifies the string to search for.
Find Necessary. Specifies the character to find.
Start Optional. Specify where to start the search.
Technical Details
return value:

Returns the position of the first occurrence of a string in another string, or FALSE if no string is found.

Note: The string position starts at 0, not from 1.

PHP version: 5+

PHP String function

 PHP Reference ManualPHP Quiz 

The content provided by W3school is for training only. We do not guarantee the correctness of the content. Through the use of the content of the site with the wind

PHP Stripos () function

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.