What is the difference between str & stristr

Showing Answers 1 - 6 of 6 Answers

Balakrishnan

  • Nov 29th, 2006
 

hai, i think the question is wrong.The correct question should be what is the difference between strstr & stristr. strstr: the syntax is: string strstr(string $string,string $str ); the function strstr will search $str in $string.if it finds the string means it will return string from where it finds the $str upto end of $string; example: $string="http://yahoomail.com"$str="yahoomail";the output is :yahoomail.com;the main difference between strstr and stristr is former consider the case difference and later ignore the case difference

Rizwan

  • Feb 6th, 2007
 

strstr($needle,$string) function will search $needle in $string if its found then it will return the rest of string after that needle. like strstr(@,br.rizwan@gmail.com) will return gmail.com only....Ans stristr is case insensitive..Rest of functionality work as strstr..

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions