What is the functionality of the function strstr and stristr?

Answers were Sorted based on User's Feedback



What is the functionality of the function strstr and stristr?..

Answer / arvind pippal(delhi)

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. syntax: strstr
(string base,string point)
examle: <?php
$email = 'arvindpippal@gmail.com';
$domain = strstr($email, '@');
echo $domain;
?>
output: @gmail.com
stristr() does the same thing in Case-insensitive manner

Is This Answer Correct ?    23 Yes 3 No

What is the functionality of the function strstr and stristr?..

Answer / umapathi

strstr-finds the first occurence of a string inside another
string (case-sensitive)
stristr-finds the first occurence of a string inside
another string (case-insensitive)

Is This Answer Correct ?    17 Yes 3 No

Post New Answer

More PHP Interview Questions

What is difference between strstr() and stristr() in PHP?

0 Answers  


What is a variable cost example?

0 Answers  


What is the difference between Session and Cookie?

0 Answers  


How to do single and multi line comment in php?

0 Answers  


Define about declare construct?

0 Answers  






Tell me is it possible to protect special characters in a query string?

0 Answers  


Why namespace is used in php?

0 Answers  


What is mysqli_query?

0 Answers  


The left association operator % is used in PHP for?

0 Answers  


What is the mysql injection?

0 Answers  


What is the difference between php and core php?

0 Answers  


What are soundex() and metaphone() functions in php?

0 Answers  


Categories