Menu

Add Topic

programming

waiting answer July 28, 2021

How to reverse a string in PHP

Answers
June 10, 2021

The PHP built-in function strrev() is used to reverse the string or reverse the text writing direction of the string.

Let's check the following example to understand how this function actually works.

    <?php
        $string = "Welcome to America";
        echo strrev(); 
    ?>

OUTPUT

         aciremA ot emocleW  

0 0

Please Login to Post the answer

Leave an Answer