Saturday, 27 September 2014

How to print string in reverse order without recursion?

function reverse($str){
    $rev = NULL;
    for($i=strlen($str)-1; $i>=0; $i--)
        $rev.=$str[$i];
        return ucwords(strtolower($rev));
}
echo reverse('Kumar Abhimanyu');

No comments:

How calulation total value for HTML input text?

<script> $j(document).ready(function(){ $j(":text").keyup(function(){ if (isNaN($j(this).val())) { alert(...