Answers for "php palindrome word check"

PHP
0

php palindrome word check

<?php
function Palindrome($MyString) {
  $revString = strrev($MyString);
  if ($revString == $MyString){
    echo $MyString." is a Palindrome string.\n";
  } else {
    echo $MyString." is not a Palindrome string.\n";
  }
}

Palindrome("radar");
Palindrome("rubber");
Palindrome("malayalam");
?>
Posted by: Guest on October-26-2021

Browse Popular Code Answers by Language