What is the functionality of the function strstr and stristr?
Answer Posted / 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 |
Post New Answer View All Answers
How to convert a string to lowercase in php?
Where sessions stored in PHP?
What is trait in php?
What are the php functions?
What is the use of the function 'imagetypes()'?
What is warning – “cannot modify header information – headers already sent”?
A process can run only in the background. State Whether True or False?
What are arguments in php?
What is static variable in php?
What is the difference between apache vs niginx?
What is a persistence cookie?
Whether php supports microsoft sql server?
Tell me how can I display text with a php script?
What is php and its uses?
What is php mean?