How to reverse a string in PHP
Answer: Use the PHP
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:
ExampleTry this code »
echo strrev("Hello world!"); // Outputs: "!dlrow olleH"
Here are some more FAQ related to this topic: