![]() |
The mb_stripos() function is an inbuilt case-insensitive function that finds the first occurrence of a substring in the string. Syntax: int|false mb_stripos( Parameters: This function accepts 4 parameters that are described below.
Return Values: This function returns the integer of the first occurrence of $needle in the $haystack parameter. If $needle is not found in the $haystack parameter, it will return “false”. Program 1: The following code demonstrates the mb_stripos() function. PHP
Output
Substring 'WORLD' found in 'Hello World' Program 2: The following program demonstrates the mb_stripos() function. PHP
Output
18 Program 3: The following program demonstrates the mb_stripos() function PHP
Output
The substring 'S' was found 8 times in the string. Reference: https://www.php.net/manual/en/function.mb-stripos.php |
Reffered: https://www.geeksforgeeks.org
PHP |
Related |
---|
![]() |
![]() |
![]() |
![]() |
![]() |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 14 |