strrev

(PHP 4, PHP 5, PHP 7)
Reverse a string
string strrev ( string $string )

Returns string, reversed.

Parameters:
string

The string to be reversed.

Returns:

Returns the reversed string.

Examples:
Reversing a string with strrev()
1
2
3
<?php
echo strrev("Hello world!"); // outputs "!dlrow olleH"
?>
doc_php
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.