Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

10. Discuss the complexities of language policies.

Answered: 1 week ago

Question

What qualities do you see as necessary for your line of work?

Answered: 1 week ago