Do you know how to reverse a string without using any loops or built in function in php?
There is an amazing recursive function will do this magic trick.
See the below lines of codes:
<?php function myreverse($str) { return $str?myreverse(substr($str,1)).$str[0]:''; } echo myreverse("SUPERMAN"); ?>
The above function will give the reverse result. Just pass the parameter.
Thanks for this recursion, but it still uses one PHP function : substr
Thanks Marty, Actually this tutorials is about without using build-in function strrev() only. 😉