If tutorials available on this website are helpful for you, please whitelist this website in your ad blocker😭 or Donate to help us ❤️ pay for the web hosting to keep the website running.
<?php
function reverse_str($str)
{
/*get string length*/
$length = strlen($str);
for($i=($length -1); $i >= 0; $i--)
{
echo $str[$i];
}
}
/*now test*/
reverse_str('elephant');
echo '<br>';
reverse_str('mohit');
?>
tnahpele tihom
Hi ! My name is Rahul Kumar Rajput. I'm a back end web developer and founder of learnhindituts.com. I live in Uttar Pradesh (UP), India and I love to talk about programming as well as writing technical tutorials and tips that can help to others.
Get connected with me. :) LinkedIn Twitter Instagram Facebook