<?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? |
How to check if a given number is a perfect number. |
Create a PHP script that checks whether a given number is a prime number or not. |
How to prevent SQL Injection using php |
Write a PHP script that calculates the factorial of a given number using an iterative approach. |
Write a PHP script that connects to a MySQL database and fetches data from a table. |
How to show location using google map in JavaScript? |
how to get response status in api using curl php? |
