<?php
function isPalindrome($str) {
$reversed = strrev($str);
return strtolower($str) === strtolower($reversed);
}
// Example usage:
$result = isPalindrome('level');
echo $result ? 'Palindrome' : 'Not a Palindrome';
?>
<?php
function isPalindrome($str) {
$reversed = strrev($str);
return strtolower($str) === strtolower($reversed);
}
// Example usage:
$result = isPalindrome('level');
echo $result ? 'Palindrome' : 'Not a Palindrome';
?>
Related
How to call travelport catalogproductofferings api using php? |
Create a PHP script that uses sessions to store and display user information. |
How to convert a temperature from Celsius to Fahrenheit using php. |
How to check whether a given year is a leap year using php. |
what is PhpUnit? |
Create a simple PHP script that calculates the sum of all even numbers between 1 and 10. |
How to show location using google map in JavaScript? |
Write a PHP script that parses JSON data and displays specific information. |
