String in PHP
string is a sequence of characters enclosed in double quotation mark or single quotation mark like . "Hello world!".
1) Calculating the Length of a String in PHP.
PHP strlen() function gives the length of a string.
2) Count The Number of Words in a String PHP?
str_word_count() function is used to counts the number of words in a string..
3) Replac Text within Strings in PHP
str_replace() function is used to replace the text given by user or replaces all occurrences of the text .
First Example :-
I amn't going.
Second Example :-
The text was replaced 1 times.
4) Reversing a String in PHP
PHP strrev() function is used to reverses a string: