Problem Statement
How can you check if a given string is a palindrome in PHP?
Explanation
A palindrome check can be done by comparing the string with its reversed version. If both are equal, the string is a palindrome.
Code Solution
SolutionRead Only
if($str == strrev($str)) echo 'Palindrome';
Practice Sets
This question appears in the following practice sets:
