Write a PHP program to reverse a string without strrev function.
<html>
<body>
    <form action="" method="POST">
        <H1>Reverse a string</h1>
        Enter the string :
        <input type="text" name="str" />
        <input type="submit" />
    </form>
</html>
<?php
if ($_POST) {
    $string = $_POST["str"];
    $len = strlen($string);
    for ($i = ($len - 1); $i >= 0; $i--) {
        echo $string[$i];
    }
}
?>
Output



there is a mistake in between heading “biodata”
“<form action=“” method=“POST”>
Enter the string :“
You have a keen eye Adil! We appreciate you pointing out the mistake and helping us maintain our high standards of accuracy.