Question
Part 3. PHP Assignment In this exercise, you will create two PHP scripts to check if a word is a palindrome. A palindrome is a
Part 3. PHP Assignment
In this exercise, you will create two PHP scripts to check if a word is a palindrome. A palindrome is a word or phrase that is identical forward or backward, such as the words racecar, level, pop. These are perfect palindromes because they dont contain any spaces, punctuation marks, or other marks. A standard palindrome is similar to a perfect palindrome, except that spaces and punctuation are ignored in a standard palindrome. For example, Madam, Im Adam is a standard palindrome because the characters are identical forward or backward, provided you remove the spaces and punctuation marks. Note: You may use any built-in string functions EXCEPT strrev() which reverses a string. Figure out the algorithm yourself so that you know how to do it.
1. Write a script that checks words or phrases stored in two separate string variables to determine if they are a perfect palindrome. Save the script as PerfectPalindrome.php.
2. Modify the program to check for standard palindromes. Save the standard palindrome script as StandardPalindrome.php.
3. Open the files in your Web browser. Correct any errors.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started