
WHAT IS THE FUNCTIONALITY OF THE FUNCTIONS STRSTR() AND STRISTR()?

strstr() function is used to return the sub string from first occurrence of string point from the string base.If string point is not found, returns FALSE. stristr() function is also but it is case insensitive.
strstr() example
<?php $username= 'deepak'; $substring_username = strstr($username, 'p'); echo $substring_username; // prints pak ?>
stristr() example
<?php $username= 'DEEPAK'; $substring_username = stristr($username, 'p'); echo $substring_username; // outputs PAK.
Thanks
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.