strstr() function returns the remainder of string beginning at the first occurrence. : strstr « String « PHP






strstr() function returns the remainder of string beginning at the first occurrence.

 
Its syntax is: string strstr (string string, string occurrence)

<?
$url = "http://www.java2s.com";
$domain = strstr($url, ".");
print $domain;
?>
  
  








Related examples in the same category

1.string strstr ( string haystack, string needle ) finds the first occurrence of a substring inside another string (parameter one)
2.strstr function demo
3.strstr.php
4.strtr() function converts all characters contained in destination to their corresponding character matches in source.
5.strtr.php