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


Please Help Members By Posting Answers For Below Questions

How to convert a string to lowercase in php?

558


Where sessions stored in PHP?

541


What is trait in php?

546


What are the php functions?

548


What is the use of the function 'imagetypes()'?

547






What is warning – “cannot modify header information – headers already sent”?

628


A process can run only in the background. State Whether True or False?

620


What are arguments in php?

558


What is static variable in php?

606


What is the difference between apache vs niginx?

602


What is a persistence cookie?

517


Whether php supports microsoft sql server?

554


Tell me how can I display text with a php script?

516


What is php and its uses?

507


What is php mean?

559