Home >>PHP String Functions >PHP strrev() Function
PHP strrev() function is used to reverse a given input string. It does not make any change in the original given input string passed as a parameter.
Syntax:
strrev($String);
Parameter | Description |
---|---|
string | This is a required parameter. This parameter contains the string to reverse. |
Here is an example of strrev() function in PHP:
<html> <body> <?php echo strrev("PHPTPOINT"); ?> </body> </html>
Here is an another example of strrev() function in PHP:
<html> <body> <?php $str = "We Love PHP"; echo strrev($str); ?> </body> </html>