PHP strrev() function
Example
Reverse the string "I love Shanghai!":
<?php echo strrev("I love Shanghai!"); ?>
Definition and Usage
The strrev() function reverses the string.
Syntax
strrev(string)
Parameter | Description |
---|---|
string | Required. Specifies the string to be reversed. |
Technical Details
Return value: | Return the reversed string. |
PHP Version: | 4+ |