Module 5.2
Module 5.2
1.php
PHP Strings
• A string is a sequence of characters, like "Hello world!".
• PHP String Functions
• strlen() - Return the Length of a String
• str_word_count() - Count Words in a String
• strrev() - Reverse a String
• strpos() - Search For a Text Within a String
• explode() - Breaks a string into an array
• strtolower() - Converts a string to lowercase letters
• strtoupper() - Converts a string to uppercase letters
• trim() - Removes whitespace or other characters from
both sides of a string