PHP Tutorial
PHP strstr() function, run and write PHP code.
PHP strstr() function - online editor.
strstr — Find the first occurrence of a string
strstr — Returns part of haystack string starting from and including the first occurrence of needle to the end of haystack. This function is case-sensitive
Syntax:
strstr(string,search,before_search);
Tags: strstr — Returns part of haystack string starting from and including the first occurrence of needle to the end of haystack. This function is case-sensitive
Syntax:
strstr(string,search,before_search);
Example 1 strstr():
<?php
$e_email = 'email_name@web_site.com';
$e_domain = strstr($e_email, '@');
echo $e_domain; // prints @web_site.com
echo "<br />";
$e_user = strstr($e_email, '@', true);
echo $e_user; // prints email_name
?>
PHP strstr() function 26
PHP strstr() function
PHP Functons
PHP count() FunctionPHP define() function
PHP empty() Function
PHP explode() function
PHP html_entity_decode() function
PHP htmlentities() function
PHP htmlspecialchars_decode() function
PHP htmlspecialchars() function
PHP implode() function
PHP isset() Function
PHP lcfirst() function
PHP ltrim() function
PHP md5() function
PHP print() function
PHP printf() function
PHP rtrim() function
PHP similar_text() function
PHP str_repeat() function
PHP str_replace() function
PHP str_split() function
PHP strcmp() function
PHP strip_tags() function
PHP strlen online function
PHP strrchr() Function
PHP strstr() function
PHP strtolower() function
PHP strtoupper() function
PHP substr() function
PHP trim() function
PHP ucfirst() function