Mega Code Archive

 
Categories / Php / Strings
 

String strstr ( string haystack, string needle ) finds the first occurrence of a substring inside another string (parameter one).tx

<?     $string = "http://www.example.com/mypage.php";     $newstring = strstr($string, "www"); ?>