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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!