A palindrome is a word or phrase that is identical when you read from forward or backward, such as the words “racecar” and “madam.” A standard palindrome is similar to a perfect palindrome, except that spaces and punctuation are ignored in a standard palindrome. For example, “Madam, I’m Adam” is a standard palindrome because the characters are identical forward or backward, provided you remove the spaces and punctuation marks. Write a PHP script that checks words or phrases stored in two separate string variables to determine if they are a perfect palindrome. In addition, see if you can modify the program to check for standard palindromes. create a web page with a text field and “Reset” and “Submit” buttons. When a user clicks on the submit button, show the standard and perfect palindromes of the string that was entered in the text field on the same page.

Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter6: Sub And Function Procedures
Section: Chapter Questions
Problem 27RQ
icon
Related questions
Question

A palindrome is a word or phrase that is identical when you read from forward or backward, such as the words “racecar” and “madam.” A standard palindrome is similar to a perfect palindrome, except that spaces and punctuation are ignored in a standard palindrome. For example, “Madam, I’m Adam” is a standard palindrome because the characters are identical forward or backward, provided you remove the spaces and punctuation marks. Write a PHP script that checks words or phrases stored in two separate string variables to determine if they are a perfect palindrome. In addition, see if you can modify the program to check for standard palindromes.

create a web page with a text field and “Reset” and “Submit” buttons. When a user clicks on the submit button, show the standard and perfect palindromes of the string that was entered in the text field on the same page.

Palindrome Tester
Type a string for testing
palindrome
testing:
Reset Submit
Result:
testing is not a standard palindrome.
testing is not a perfect palindrome.
Palindrome Tester
Type a string for
palindrome
testing:
madam
Reset Submit
Result:
madam is a standard palindrome.
madam is a perfect palindrome.
Transcribed Image Text:Palindrome Tester Type a string for testing palindrome testing: Reset Submit Result: testing is not a standard palindrome. testing is not a perfect palindrome. Palindrome Tester Type a string for palindrome testing: madam Reset Submit Result: madam is a standard palindrome. madam is a perfect palindrome.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Knowledge Booster
Problems on Dynamic Programming
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning