PHP strrev() string function

The strrev() function in PHP

The strrev() function used to returns a reverses character of given string.

strrev() function syntax


PHP strrev() function example

echo "The Revers string of given string = ". strrev("Hello Meera Academy");

The out put is :

The Revers string of given string = ymedacA areeM olleH

PHP form example of strrev() string function

<title>PHP strrev() Function</title>

<FORM method="POST" action="firstexample.php">

Name : <input type="text" name="name"> <br/><br/>
<input type="submit" name="Submit1" value="Revers String">


echo "The Revers string of given string = ". strrev($_POST["name"]);


The out put of php strrev() function example is :

PHP strrev() string function
PHP strrev() string function

Leave a Reply

Your email address will not be published. Required fields are marked *