The following are some functions which can be used on strings in php.
- str_word_count :- str_word_count has different results depending on parameters.
- str_word_count($string_variable) returns the word count
- str_word_count($string_variable, (0,1 or 2)) where
- 0 returns the word count(the default option)
- 1 returns an array
- 2 returns an associative array
- str_word_count($string_variable, (0,1,2), ' (something to be included as a word for ex '.!&' ').
- different arguments included next to each other.
- str_shuffle($string_variable) :- shuffles string_variable
- substr($string_variable, starting position, ending position) :- returns the substring
- strlen($string_variable) :- returns the length of the string_variable
- strtolower($string_variable) :- returns $string_variable with all characters in lower case
- strttoupper($string_variable) :- returns $string_variable with all characters in upper case