answersLogoWhite

0

You can do this:

<?php

if ( $word === strrev( $word ) ) {

echo "The word is a palindrome";

} else {

echo "The word is not a palindrome";

}

User Avatar

Wiki User

10y ago

Still curious? Ask our experts.

Chat with our AI personalities

ProfessorProfessor
I will give you the most educated answer.
Chat with Professor
ReneRene
Change my mind. I dare you.
Chat with Rene
ViviVivi
Your ride-or-die bestie who's seen you through every high and low.
Chat with Vivi

Add your answer:

Earn +20 pts
Q: Write a PHP program to check whether the string is palindrome or not?
Write your answer...
Submit
Still have questions?
magnify glass
imp