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 terminate the execution of a script in PHP?
What does PEAR stands for?
Explain me what are the differences between mysql_fetch_array(), mysql_fetch_object(), mysql_fetch_row()?
How to increase session life time using PHP?
Tell me what the difference between the 'bitwise and' operator and the 'logical and' operator?
Where session is stored?
How to convert a character to an ascii value?
What are php keywords?
What is a php class?
How do you compare strings in java?
Is array a key php?
What is the difference between Session and Cookie?