How to reverse a string in PHP
strrev()
You can use the PHP strrev() to reverse the text writing direction of a string.
Let's take a look at an example to understand how it basically works:
<?php echo strrev("Hello world!"); // Outputs: "!dlrow olleH" ?>
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
Use the PHP
strrev()functionYou can use the PHP
strrev()to reverse the text writing direction of a string.Let's take a look at an example to understand how it basically works:
need an explanation for this answer? contact us directly to get an explanation for this answer