PHP Basic String Functions
1. Strlen(string) – to find length of string
2. Str_word_count(string) – to display no of words in given string
3. Strrev(string) – to find reverse of string
4. Strpos(string,text) – to find particular text within a string
5. Str_replace(string to be replaced, text, string) – used to replace specific text within a string
6. Ucfirst(string) – converts the first letter of string to uppercase
7. Lcfirst(string) – converts the first letter of string to lowercase
8. Ucwords(string) – to convert the string to title case
9. Strtoupper(string) – to convert the string into uppercase
10. Strtolower(string) – to convert the string into lowercase
11. Str_repeat(string,repeat) – to repeat a string a number of times
12. Strcmp(string1,string2) – to compare two strings. Same as c language
13. Substr(string , start, length) – to extract a part of string from it.
14. Trim(string,charlist) – to remove whitespaces and specified characters from both sides of string
15. Explode(string) – used to convert string into array variable
16. Chr(ascii) – to find character from given ascii value