|
|
Tutorials » Php »
|
Topic |
What is stristr Function and how it is used in string?
|
|
Explanation |
|
In PHP,this function searchs for the first occurence of a string inside another string.
Syntax:
stristr(string,search)
In the above syntax "string" specifies the string to search, "search" specifies the string to search for.
Example:
<?php
echo stristr("Hi,my name is Sam Anderson.",n);
?>
Result:
name is Sam Anderson
In the above example the string is displayed from the first occurence of the letter "n".
|
|
A Note |
Learn PHP programming language tutorial with simple and neat example. Hope you enjoy this free tutorial.
Do give us your valuable feedback and suggestions on this online tutorial. This is a Copyright Content.
|
|
|
|