this is php code using function argument to check string is palindrome or not..help me out in telling me step by step ..whats the process is happening...iam unable to understand
function Palindrome($string) {
if ((strlen($string) == 1) || (strlen($string) == 0)) {
echo " STRING IS PALINDROME";
}
else {
if (substr($string,0,1) == substr($string,(strlen($string) - 1),1)) {
return Palindrome(substr($string,1,strlen($string) -2));
}
else { echo " STRING IS NOT A PALINDROME"; }
}
}
Palindrome("121");