SQL PHP HTML ASP JavaScript articles and free scripts to download
 

PHP String Reverse

We can reverse any string by applying strrev function. Here is what a normal string will look like.

The string = This is a test

The new string after applying the strrev function is here

tset a si sihT


Here is the code

$st="This is a test";

echo "The string = ".$st."<br>";

$st=strrev($st);

echo "The new string after applying the strrev function = ".$st."<br>";





Post Comment This is for short comments only. Use the forum for more discussions.
Name
Email( not to be displayed)Privacy Policy
1+2=This is to prevent automatic submission by spammers. Please enter the result of the sum as asked


Join Our Email List
Email:  
For Email Newsletters you can trust
String Functions
PHP Sections