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>";


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

Printing the string in reverse without using strrev() function.

Here is the code.
$st="Hello world";
//echo $st[4];
echo $st[$i];
Output is here
dlrow olleH
Your Rating


PHP String Functions


Nice Collection.. I feel very happy

Post Comment This is for short comments only. Use the forum for more discussions.

HTML . MySQL. PHP. JavaScript. ASP. Photoshop. Articles. FORUM Contact us
©2000-2017 All rights reserved worldwide Privacy Policy Disclaimer