- strlen()
- strrev()
- str_word_count()
- strpos()
- str_replace()
Find String Length in php
strlen() function is used to get the total length of the given string.Syntax for strlen()
strlen("string");
String Reverse in php
strrev() function is used to reverse the order of the string return that value.Syntax for strrev()
strrev("String");
Words count in php
php str_word_count() is used to count the words in given sentence.Syntax for str_word_count()
str_word_count ("sentence or string");
Example(Press Run to O/P):
Find string position
strpos() is used to search a particular string or character and returns the position of the string.Syntax for strpos
strpos ("string1","string2");
Example(Press Run to O/P):
Replace method in php
str_replace() is used to replace the particular string with matched stringSyntax for str_replace
str_replace("string1","string2","string3");
Example(Press Run to O/P):
0 comments:
Post a Comment