echo strrev($input_string);
$input_string: Input string to be reversedThe string = This is a test
The new string after applying the strrev() function is here
tset a si sihT
$st="This is a test";
echo "The string = ".$st."<br>";
$st=strrev($st);
echo "The new string after applying the strrev function = ".$st."<br>";
<?Php
$st="Hello world";
//echo $st[4];
$length=strlen($st);
for($i=$length-1;$i>=0;$i--){
echo $st[$i];
}
?>
Output is here
dlrow olleH
This function support utf-8 encoding and does not work with unicode strings.
huzoor | 23-04-2012 |
Nice Collection.. I feel very happy |