//how to reverse a string
$string = "FTFL!!";
$count = strlen($string) - 1;;
for($i = $count; $i >= 0; $i--){
echo $string[$i];
}
$string = "FTFL!!";
$count = strlen($string) - 1;;
for($i = $count; $i >= 0; $i--){
echo $string[$i];
}
code, .code { display: block; background: beige; padding: 10px; margin: 8px 15px; }
No comments:
Post a Comment