What is the functionality of the function strstr and stristr?
Answers were Sorted based on User's Feedback
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 |
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 |
How to set a value in session? How to remove data from a session?
What is use of header() function in php? What the limitation of header()?
Why many companies are switching their current business language to php? Where php basically used?
What is the difference between client-side and server-side programming?
What is put method in php?
What is the best way to change the key without changing the value of a php array element?
What is whitespace in html?
Do while loops php?
Which is a perfect example of runtime polymorphism?
how can i upload only pdf files in my website? files has not a pdf extension mantioned
How data or variable can be receive or send from PHP to HTML page??
When to use get and post request?