The strtoupper() function converts the string to uppercase.
$x |
The strtolower() function converts the string to lowercase.
$x |
The PHP str_replace() function replaces certain characters in a string with other specified characters.
Replace the text “World” with “Dolly”:
$x |
The PHP strrev() function reverses a string.
Reverse the string “Hello World!”:
$x |
Whitespace refers to the spaces before and/or after the actual text, and you often want to remove this extra space.
The trim() function removes any whitespace from the beginning and end of a string.
$x |
The PHP explode() function divides a string into an array.
The first parameter of the explode() function indicates the “separator,” which specifies the points at which to split the string.
Note: The separator is mandatory. |
Split the string into an array using the space character as the separator:
$x //Use the print_r() function to display the result: /* |