What is the functionality of the functions STRSTR() and STRISTR()?
By Balu Prasad
STRSTR() and STRISTR() functiuonalities....
Teacher SiliconIndia replied to Balu Prasad Monday, November 09, 2009
Hi Balu,
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)
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